Problem with PhpMyAdmin

DjMiX

Well-Known Member
Nov 2, 2004
63
0
156
Hello all,

I have been trying to fix an issue for a few days now, but nothing worked.
Access to PhpMyAdmin from Cpanel is not possible, except from WHM directly. When users try to go to phpmyadmin thru the link in Cpanel, they are proposed to download/save the index.php file (3rdparty/phpMyAdmin/index.php?lang=fr-iso-8859-1).

If we save/download the file, we can see, inside:
Warning: main(./libraries/common.lib.php): failed to open stream: No such file or directory in /usr/local/cpanel/base/3rdparty/phpMyAdmin/index.php on line 36

Fatal error: main(): Failed opening required './libraries/common.lib.php' (include_path='.:/usr/share/php') in /usr/local/cpanel/base/3rdparty/phpMyAdmin/index.php on line 36
Any help will be very appreciated.

Kind Regards.
 

WEB-PROS

Well-Known Member
Feb 19, 2006
110
0
166
Have you recently upgraded PHP, if you havent change your upgrade settings to one down, then run upcp --force, then upgrade your upgrade settings back and upcp --force.

This should fix your problem, however first have you actually checked to see if the file it is looking for exists and if it is chmod to a viewable state.

Hope you get the system working soon.
 

DjMiX

Well-Known Member
Nov 2, 2004
63
0
156
I've tried those solutions already... :confused:
The file is present in :/usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries, it's on a 777 permission. However, it is not present in /usr/share/php, but I don't think it should...
It is also very weird that PhpMyAdmin works via the WHM link, but not via the Cpanel link.
 
Last edited:

WEB-PROS

Well-Known Member
Feb 19, 2006
110
0
166
This is probably because when using php myadmin as a root user it does not access that "common" file.

Have you checked to make sure that the variable $cfg['PmaAbsoluteUri'] in phpmyadmin config points to the correct directory where the correct lib file is placed.

If you need any further help then ask.
 

DjMiX

Well-Known Member
Nov 2, 2004
63
0
156
Here is what I have:

$cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
. $_SERVER['HTTP_HOST']
. (!empty($_SERVER['SERVER_PORT']) ? ':' . $_SERVER['SERVER_PORT'] : '')
. '/3rdparty/phpMyAdmin/';
I've tried modyfing "/3rdparty/phpMyAdmin/" to "/usr/local/cpanel/base/3rdparty/phpMyAdmin/", but it didn't change anything. I also tried setting it to nothing (empty) like the documentation advises, but doesn't work either.

Thank you again, I really appreciate your help.
 

WEB-PROS

Well-Known Member
Feb 19, 2006
110
0
166
When you login to Cpanel are the users forwarded to https: or do they continue to use http:// ?

Also have you recently run anything that could affect the chown of that file try running chown and setting the file to be owned by the correct owner, it should be set to cpanel

Code "chown cpanel common.lib.php"

This could be the cause as if the file is set to be owned by a user that cpanel server can not access the file appears as if it is not there, this could also be the reason why the index.php file asks you to download because cpanel's server does not have permission to execute the file.
 
Last edited:

DjMiX

Well-Known Member
Nov 2, 2004
63
0
156
Users stay on http, no https.
The owner was cpanel, I've tried changing it to root or nobody, didn't change anything...
 

DjMiX

Well-Known Member
Nov 2, 2004
63
0
156
Got it fixed with the release from yesterday.

Than you for your help guys, I appreciate.