bradgrafelman;10915785 wrote:Have you tried restarting your webserver?
Well, I restarted Apache.
double (and triple) check that both the include path as well as the open_basedir path you added are typed correctly - I've had a simple typo be the bane of my existence more than a couple of times in a similar situation. :p
I know what you mean. Thanks. I did triple check.
Try using nothing but the third include example you posted above, and also insert the following code just after it:
echo "-- open_basedir: " . ini_get('open_basedir') . " --";
and paste what it outputs.
Here is what it gave me:
Warning: include_once() [function.include-once]: open_basedir restriction in effect. File(/var/www/vhosts/ourdomain.com/lib/lib_test.php) is not within the allowed path(s): (/var/www/vhosts/ourdomain.com/httpdocs:/tmp) in /var/www/vhosts/ourdomain.com/httpdocs/index.php on line 14
Warning: include_once(/var/www/vhosts/ourdomain.com/lib/lib_test.php) [function.include-once]: failed to open stream: Operation not permitted in /var/www/vhosts/ourdomain.com/httpdocs/index.php on line 14
Warning: include_once() [function.include]: Failed opening '/var/www/vhosts/ourdomain.com/lib/lib_test.php' for inclusion (include_path='.:') in /var/www/vhosts/ourdomain.com/httpdocs/index.php on line 14
-- open_basedir: /var/www/vhosts/ourdomain.com/httpdocs:/tmp --
I just confirmed this line in /etc/php.ini:
open_basedir = /var/www/vhosts/ourdomain.com/httpdocs:/var/www/vhosts/ourdomain.com/lib:/tmp
I just now ran phpinfo() again, just to be sure, and it reports:
open_basedir
local value
/var/www/vhosts/ourdomain.com/httpdocs:/tmp
master value
/var/www/vhosts/ourdomain.com/lib
So... I remain puzzled.