December 18, 2009

session_start() [function.session-start]: SQLite: failed to open/create session database

This is usually a bug in the PhpMyAdmin configuration, whenever you receive the following error when accessing PhpMyAdmin either from WHM or cPanel,
Error :
Warning: session_start() [function.session-start]: SQLite: failed to open/create session database `/var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb’ - unable to open database: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 86
Fatal error: session_start() [function.session-start]: Failed to initialize storage module: sqlite (path: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 86
Manually edit /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini file as follow:
1)Login to shell of the server using root login details and open the file “/usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini” using vi or any other editor.
2) Search for the [Session] variable & underneath it, change the following
Replace:
——————————-
session.save_handler = sqlite
session.save_path =/var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb
——————————-
To:
——————————-
session.save_handler=files
session.save_path=/tmp
——————————-
By default, PhpMyAdmin uses sqlite as as the file handler, but it needs to be changed to files & the location of the session files to be stored needs to be changed to /tmp which is the standard/default place to store temporary files
Once done, save & exit the php.ini file & restart the webserver using “/scripts/restartsrv_httpd”.
You can also ‘chattr’ the file such that it doesn’t get reverted back to original whenever cPanel updates it in the future..

No comments:

Post a Comment