Forum Moderators: coopster

Message Too Old, No Replies

PHP Can't Open PHPMyAdmin Library

PHP can't open common.inc.php; worked yesterday.

         

webfoo

3:54 pm on Aug 3, 2016 (gmt 0)

10+ Year Member



Hello All! It has been a few years but I am back! Not sure if this is the right forum for this thread, mods please redirect me if I'm wrong.

I'm having an issue today with a PHPMyAdmin installation that has been running without issue for several months. I went to PMA this morning to do a bulk data upload, and I got a white screen instead of the login screen. Yesterday this was not the case - everything worked. The website itself works fine, and queries the database properly, so I know PHP and MySQL are both running.

The PHP error log shows this message:
[03-Aug-2016 08:43:40 America/New_York] PHP Fatal error: require_once(): Failed opening required './libraries/common.inc.php' (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\phpMyAdmin\js\whitelist.php on line 21


I checked, and the common.inc.php file IS present. Any ideas?

EDIT: I should point out that I am running PHP 5.6 on IIS / Windows Server 2012 R2. PHPMyAdmin is version 4.5.4.1A.

whitespace

5:20 pm on Aug 3, 2016 (gmt 0)

10+ Year Member Top Contributors Of The Month



Presumably you are unaware of anything having changed since yesterday when "everything worked"?

Have permissions changed to make that file unreadable by the PHP process?

I wonder where it is trying to look for that file? It looks for that file relative to the CWD and a few lines above that (in "whitelist.php") it changes the CWD by moving up to the parent directory (which all seems a bit "risky" to me) - at least in the version of "whitelist.php" that I'm looking at (https://github.com/phpmyadmin/phpmyadmin/blob/master/js/whitelist.php).

Before line#21 in "whitelist.php" you could try checking what it thinks is the CWD or what the relative path resolves to:


throw new Exception(realpath('./libraries/common.inc.php'));


Assuming there isn't an exception handler that catches this exception you should get a fatal error with the absolute filesystem path of where it is looking.

webfoo

5:33 pm on Aug 3, 2016 (gmt 0)

10+ Year Member



@Whitespace, you are correct - I am not aware of any changes made since yesterday (permissions or otherwise).

Oddly enough, PMA started working just fine again. Very peculiar! I am left to wonder what caused it to stop working, what caused it to start working again, and whether I will face this problem again in the future.

Thanks for your help.