Uncategorized

How to fix phpMyAdmin session error

here is what i get when i run phpMyAdmin on my newly setup server

phpMyAdmin – Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

To test and find out where is session.save path

http://wiki.phpmyadmin.net/pma/session.save_path

run this script on your web server

<?php
// save as "session_test.php" inside your webspace
ini_set('display_errors', 'On');
error_reporting(6143);

session_start();

$sessionSavePath = ini_get(‘session.save_path’);

echo ‘<br><div style=”background:#def;padding:6px”>’
, ‘If a session could be started successfully <b>you should’
, ‘ not see any Warning(s)</b>, otherwise check the path/folder’
, ‘ mentioned in the warning(s) for proper access rights.<hr>’;

if (empty($sessionSavePath)) {
echo ‘A “<b>session.save_path</b>” is currently’,
‘ <b>not</b> set.<br>Normally “<b>’;
if (isset($_ENV[‘TMP’])) {
echo  $_ENV[‘TMP’], ‘</b>” ($_ENV[“TMP”]) ‘;
} else {
echo ‘/tmp</b>” or “<b>C:tmp</b>” (or whatever’,
‘ the OS default “TMP” folder is set to)’;
}
echo ‘ is used in this case.’;
} else {
echo ‘The current “session.save_path” is “<b>’,
$sessionSavePath, ‘</b>”.’;
}

echo ‘<br>Session file name: “<b>sess_’, session_id()
, ‘</b>”.</div><br>’;
?>

Here is the output i have

The current “session.save_path” is “/var/lib/php/session”.

If the folder doesn’t exist, create one.

You may have to change ownership of the directly

chown user:group /var/lib/php/session

Or just need to change the permissions to readable and writable for the directory

chmod 0777 /var/lib/php/session

Related Articles

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Back to top button