Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   PHP Warning Help (http://www.greenguysboard.com/board/showthread.php?t=63289)

housekeeper 2011-12-27 02:30 PM

PHP Warning Help
 
I'm not a genius in php, but having a problem with this error message. Tried google searches open_basedir as well as is_readable(), but everyones situation is different. Some threads pointed towards hosting or permissions, etc. Mine seems to center around languages, this file doesn't exist in my directory 'en_US.mo' Hope someone may have some insight as to how I could fix it, seems I'll need to create something

PHP Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/wp-content/languages//en_US.mo) is not within the allowed path(s): (/home/username/:/tmp:/var/tmp:/usr/local/lib/php/) in /usr/home/username/domains/my-domain.com/public_html/wp-includes/l10n.php on line 334

Toby 2011-12-27 03:01 PM

Translation: A PHP command is using a relative path (i.e. "../folder/file) to access a file in a parent folder rather than the full actual path.

Most PHP installs block access to files in parent folders via relative path for security reasons. It makes it harder for malicious scripts to take over a box.

housekeeper 2011-12-28 04:35 PM

Thanks for the reply Toby, of course those scripts being run to try and manipulate any vulnerabilities are far too commonplace

cd34 2011-12-29 11:55 PM

Quote:

Originally Posted by housekeeper (Post 511907)
PHP Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/wp-content/languages//en_US.mo) is not within the allowed path(s): (/home/username/:/tmp:/var/tmp:/usr/local/lib/php/) in /usr/home/username/domains/my-domain.com/public_html/wp-includes/l10n.php on line 334

Your path is not set correctly for the translations. You have it set to the URL relative path rather than the actual file path. Unless /home/username/ is a bind mount, your root path should be /usr/home/username/domains/mydomain.com/public_html/wp-content/languages//en_us.mo - however, there are two issues there. That actual file path (/usr/home/) is not included in your basedir restrictions - perhaps removing the /usr prefix and just using /home/username/domains/mydomain.com/public_html/wp-content/languages will work.

But, the second thing is the double // in the file it is looking for - I don't recall if it is inserting a variable there or if you're using a trailing slash on the /wp-content/languages/ path set in the admin. If it should be inserting a variable, it is possible that globals are disabled on your site (as they should be) and the plugin/template you're using is depending on them. I'm reasonably sure you just have your path set with the trailing /.


All times are GMT -4. The time now is 09:18 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc