phpMyAdmin is great free web based PHP software to manage databases, tables, fields, users… and more. phpMyAdmin support MySQL, MariaDB, and Drizzle with the ability to execute SQL statements.
Unfortunately sometimes I get problem with phpMyAdmin, here is the error from phpMyAdmin on my centos Linux Server
phpMyAdmin – Error
1
|
Cannot start session without errors,please check errors given inyour PHP and/orwebserver log file andconfigure 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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?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>’
,‘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
1
|
The current«session.save_path»is«/var/lib/php/session».
|
If the folder doesn’t exist, create one.
1
|
# mkdir /var/lib/php/session
|
You may have to change ownership of the directly
1
|
# chown user:group /var/lib/php/session
|
Or just need to change the permissions to readable and writable for the directory
1
|
# chmod 0777 /var/lib/php/session
|
Note: /var/lib/php/session ownership and permissions well reverse back to root and not writable after a reboot. It’s a good idea to run chmod and chown @reboot so you don’t have to do it manually.
add this to your crontab
1
|
# crontab -e
|
with the content (replace user:group to user/group which running apache/nginx web server)
1
2
|
@reboot chown user:group/var/lib/php/session
@reboot chmod0777/var/lib/php/session
|