phpMyadmin giving error of Token Mismatch - database

When I try to click and open any link or database in phpMyadmin it results in a Token Mismatch error on my hosting server.
Does anyone know what the problem might be?

You need to verify that you have your session.save_path setting in your php.ini file set correctly.
After changing to a valid tmp directory, make sure you restart your webserver.

this fixes same error for me
find session.save_path in your php.ini file, this line may look also like this
;session.save_path = "/opt/lampp/temp/"
remove first semicolon from this line if it there
change it to
session.save_path = "/tmp"

Related

GoogleAppEngine error directory not found

Ive been working on get a proxy working for when im school, to access sites that i use alot for work but my school dont like.. This is the error it comes up with when i try to upload the files to googles app engine..
C:\Program Files (x86)\Google\google_appengine>"C:\Python27\python.exe" appcfg.p
y update C:\Users\alastair\Desktop\School Files\Proxy Files\mirrorrr-master\mirrorrr-master
09:44 PM Host: appengine.google.com
Usage: appcfg.py [options] update | [file, ...]
appcfg.py: error: Directory does not contain an School.yaml configuration file
So im very confused on why it is asking for a "School.yaml" But i made one anyway, And even though its been made, it still displays this error, So if anyone can help, Please!
Your full project path contains two space characters and needs to be quoted, also, a trailing slash might be required i.e.:
C:\Python27\python.exe appcfg.py update "C:\Users\alastair\Desktop\School Files\Proxy Files\mirrorrr-master\mirrorrr-master\" assuming that's where you have your app.yaml file.
In your case it's thinking you are pointing to "C:\Users\alastair\Desktop\School" file which does not exist and thus showing the error.

save pdf on server fpdf

I am generating a pdf with fpdf in cakephp and I try to save it on the server.
I do it like this :
$fpdf->Output("D:/Files/mypdf.pdf",'F');
but it doesn't save.
I think it doesn't find the folder, but I don't know how specified it?
I have put the all the right on the folder.
I don't know if it is a cakephp restriction or just my directory?
Try this
$fpdf->Output(WWW_ROOT."files\mypdf.pdf", 'F');
As this code works fine locally, it's probably server-problem.
(1) Are you sure you can create files? Most free servers disallow creating files.
(2) Have you tried it with different location e.g. the current root location $fpdf->Output("mypdf.pdf",'F')
Anyway, you should enable error reporting in your index.php. If it was matter of directory not found you would get this result:
Warning (2): fopen(D:/Files/mypdf.pdf): failed to open stream: No such file or directory [ROOT\vendor\fpdf\fpdf.php, line 1025]
FPDF error: Unable to create output file: D:/Files/mypdf.pdf
Just a wild guess but change the slashes to windows style.
$fpdf->Output("D:\Files\mypdf.pdf",'F');
or even
$fpdf->Output("D:\\Files\\mypdf.pdf",'F');

Cakephp giving Fatal error in my local computer

I have a projects in cakephp which is a big size projects.. It is running perfectly in another computer or in the server. But when I copy the files and database to my local computer then it shows the following error.
Fatal error: Maximum function nesting level of '100' reached, aborting! in D:\wamp\www\faceadz\cake\libs\debugger.php on line 248
Project is running in wamp server.
Please help me...
thanks
there might be 2 solution will work for you in you local machine configuration
1. A simple solution solved to your problem. you can just commented the:
"zend_extension = "d:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll"
in your php.ini file. This extension was limiting the stack to 100 so I disabled it. The recursive function is now working as anticipated.
2. and
Assuming you're using xdebug, you can set your own limit with
ini_set('xdebug.max_nesting_level', $limit)
EDIT
Also it will help you
changes the file /etc/mysql/my.cnf parameter to something like that max_allowed_packet = 512M
Get sure you've got xdebug installed (use phpinfo()) and then change the file /etc/php5/fpm/php.ini adding or editing the line : xdebug.max_nesting_level=1000
Restart both services sudo service mysql restart sudo service php5-fpm restart
If it doesn't work you can still set those two parameters to false at /etc/php5/fpm/php.ini xdebug.remote_autostart=0 xdebug.remote_enable=0
hope it will help you,

Code to be executed before every page on server

I have an apache2 server, it has a vast and growing folder structure.
There is a set of instructions I would like to be executed at the beginning of every page in that website.
How do I implement that without pasting those very lines at the beginning of every file in the website?
I don't want to have the code at the beginning of every file.
I have tried changing the auto_prepend_file in php.ini to:
auto_prepend_file = ~/website_preview/say_hello.php
'say_hello' is a hello-world php script, but the script does still not get executed at all.
Wrong php.ini file, correct location is /etc/php5/apache2/php.ini
If all of your pages are in PHP, then I think you were on the right path with setting up auto_prepend_file in php.ini.
Try this:
Check your include_path in php.ini and if needed append a new path to it for your instructions file.
Copy your instructions.php file to the location from the include path.
Edit your auto_prepend_file in php.ini to be just the filename from step 2.
I tested this out and was able to get it working that way but had trouble specifying the path directly in the auto_prepend_file setting.
Also, when I had the auto_prepend_file setting configured improperly I received the following php error:
PHP Fatal error: Unknown: Failed opening required ...
Hope that helps.

Joomla database connection infinite loop

My Joomla site located on first machine and a database on second.
I updated the configuration.php parameters $host, $user, $password and$db
But I got error saying an infinite loop has been detected.
I'm running Joomla version: 1.7.3 stable.
What's wrong?
Chances are it is a php error in your configuration.php file - possibly your password includes a quote or some other character than breaks the PHP - introducing a syntax error.
As a quick test - you could create a .php file (perhaps test.php) that includes 'configuration.php'. Load your test.php file and see if you get an error.
Alternatively - inspect your configuration.php file manually to spot the error. If you edited it manually you may have deleted a semi-colon for example.
Hope that helps.

Resources