Question

I get an Error 500, page isn't working/currently unable to handle this request when I navigate to http://my_IP/phpmyadmin/. Thanks

Posted April 28, 2017 79.8k views
UbuntuMySQLApachePHPLAMP Stack

I have successfully installed Apache, MySQL. I installed PHP5.6 instead of 7.*, I have also installed php5.6-mbstring and php5.6-gettext. Checking the Apache Error Logs, I noticed the following lines of errors.

PHP Warning:  require_once(): open_basedir restriction in effect. File(/usr/share/php/php-php-gettext/gettext.inc) is not within the allowed path(s): (/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/) in /usr/share/phpmyadmin/libraries/common.inc.php on line 77

And this one

PHP Warning:  require_once(/usr/share/php/php-php-gettext/gettext.inc): failed to open stream: Operation not permitted in /usr/share/phpmyadmin/libraries/common.inc.php on line 77

Please I need an assistance, I’ve had to destroy my droplet twice to just to start the whole process again.

Thanks.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

@Chrismarcel

The reason you’re seeing the error is because open_basedir is configured and active. With it active, only certain paths are allowed to be accessed, as defined by the configuration.

While this file is attempting to be loaded:

/usr/share/php/php-php-gettext/gettext.inc

You’re only allowing:

/usr/share/php/php-gettext/gettext.inc

There’s an extra php- in the first path, which is is what’s throwing things off.

That said, open_basedir isn’t enabled by default on any of the default repositories or any of the add-on repositories that I’ve used, so this would be something that you’ve configured at some point or it’s something that was configured for you by a script.

Finally fixed it, had to include /usr/share/php/php-php-gettext/ in /etc/phpmyadmin/apache.conf. It worked. Thanks.

  • helo im also found this problem, please tell me how to do this step ?

    Thankyou

    • The error is too generic and does not tell you exact problem. What you need is to find out what is the real issue. If your site is serving a Internal Server Error, this can be caused by a number of things, such as:

      • Errors in .htaccess files
      • Server permission
      • Server timeout
      • Script timeout
      • Or some other Web Server Issues

      Normally, a permissions issue on the file (or files) would be one cause of the 500 Internal Server Error. The simple solution is to run chmod 644 on the problem file(s) or chmod 755 on the directories.

      $ sudo chmod -R 777 /"your files location"
      

      The best way to debug the error depends upon the server and what’s actually running at the time. Consider some debugging tips to help diagnose and fix common causes of this problem.

      edited by MattIPv4
Submit an Answer