Home > Article > Backend Development > phpmyadmin error: Cannot start session without errors_PHP Tutorial
I found a solution to the problem of Cannot start session without errors when using phpmyadmin. I hope this article can help you.
Solution 1, nginx environment
In a new environment, installed a phpmyadmin
I found a prompt when opening it: Cannot start session without errors….
Then when I logged in, I also found errors in styles, etc.
Solution:
It’s a permission access issue with the session storage directory in the PHP environment
First open php.ini
Find: session.save_path
Check whether the owner of the directory under the path is normal:
root apache 4096 Mar 15 23:07 session
If this is the case, it is obviously abnormal
It should be changed to:
apache apache 4096 Mar 15 23:07 session
or
nginx nginx 4096 Mar 15 23:07 session
etc.
Also please note! , if it is nginx + php-fpm, in addition to checking the settings of /etc/php.ini, you must also check:
/etc/php-fpm.d/www.conf
php_value[session.save_path] = /var/lib/php/session
The storage path of this session must be consistent with php.ini! ! !
Solution 2
Environment: linux, apache2, php5
Question:
The following error appears when opening phpmyadmin:
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
Solution:
vim /etc/php5/apache2/php.ini
Look for session.save_path and remove the comment symbol in the sentence session.save_path=/var/lib/php5.
If it still doesn’t work properly, change the value of session.auto_start to 1 (start), the default is 0 (disable)
Solution 3
Windows Server 2003 + IIS6 (ISAPI mode php +zend)
Create a folder Temp in the php directory, and set the Temp attribute to all permissions of the IIS_Users group except full control. (IIS_Users is the IIS anonymous user group)
Find the session.save_path line in php.ini and set it to session.save_path = “D:/host/php/Temp” (remove the semicolon).
Solution:
Change the value of session.auto_start in php.ini to 1 (start), the default is 0 (disable),
Find the session.save_path line in php.ini and set it to session.save_path = “D:/host/php/Temp” (remove the semicolon)
Found in phpmyadmin, config.sample.inc.php, changed to config.inc.php,
Find $cfg['blowfish_secret'] and add a combination of numbers and letters to the subsequent assignment.