By Chris James
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Finally fixed it, had to include /usr/share/php/php-php-gettext/ in /etc/phpmyadmin/apache.conf. It worked. Thanks.
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.