PHP Warning: realpath(): open_basedir restriction
-
We get these in our logs about a million times a day,
PHP Warning: realpath(): open_basedir restriction in effect. File(/var/www/example.com) is not within the allowed path(s): (/var/www/example.com/www/:/usr/share/php/:/usr/local/lib/wordpress/plugins/) in /var/www/example.com/www/public/wp-content/plugins/wp-google-maps/legacy-core.php on line 385
Looking at that code… does it really need to guess the document root? Or rather, what special form of the document root does it desire? Normally
ABSPATH
is what you want.In any case, the correct document root for us is
/var/www/example.com/www/public
. It never should have made it up to/var/www/example.com
.
- The topic ‘PHP Warning: realpath(): open_basedir restriction’ is closed to new replies.