Archive for January 2011

PHPMyAdmin : Existing configuration file (./config.inc.php) is not readable

When trying to access PhpMyadmin from CPanel/WHM if you are getting the error :

Existing configuration file (./config.inc.php) is not readable

this means that the ownership of the file “config.inc.php” was not correct .

And you can easily fix this by following the below steps :

Login to the server as root user :

[email protected][#] cd /usr/local/cpanel/base/3rdparty/phpMyAdmin

and then check the ownership of the file : config.inc.php

[email protected][/usr/local/cpanel/base/3rdparty/phpMyAdmin]# ls -l config.inc.php

-rw-r—– 1 root root 2409 Nov 12 11:57 config.inc.php

and the ownership should be :

-rw-r—– 1 root cpanelphpmyadmin 2409 Nov 12 11:57 config.inc.php

which you can easily set by running the below command :

[email protected][/usr/local/cpanel/base/3rdparty/phpMyAdmin]# chown root:cpanelphpmyadmin config.inc.php

Or

[email protected][/usr/local/cpanel/base/3rdparty/phpMyAdmin]# chown root.cpanelphpmyadmin config.inc.php

Now when you run the command ls -l config.inc.php it should show the output as :

-rw-r—– 1 root cpanelphpmyadmin 2409 Nov 12 11:57 config.inc.php

and finally restart CPanel service on the server

[email protected][#] /etc/init.d/cpanel restart

That’s all easy isn’t it.

PhpMyadmin Cannot start session without errors

If you are getting above error while opening  phpmyadmin  through  CPanel/WHM this means that the parameters  :

session.save_handler and session.save_path are not correctly defined in php.ini file for phpmyadmin .

You can easily fix this by following the below steps :

Login in to the  Shell/SSH  with the root user :

[email protected][#]  vi /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini

and search  for parameters :

session.save_handler

session.save_path

You will  find the entries as :

session.save_handler = sqlite
session.save_path =/var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb

Just replace  those  entries to  :

session.save_handler = files
session.save_path = /tmp

Save and quit.

finally restart the Apache and CPanel service :

[email protected][#]  /etc/init.d/httpd restart

[email protected][#] /etc/init.d/cpanel  restart

That’s all you are done.