[BlueOnyx:10387] Re: open_basedir restriction in effect.
DD
bqlist at distortal.com
Sat Apr 28 04:14:08 -05 2012
A simpler test - if anyone wants to try reproducing this, be my guest.
I set up an entry in /etc/crontab thus:
* * * * * user /usr/bin/php -d
open_basedir=/home/.sites/70/site4/:/tmp/:/var/lib/php/session/:/usr/sausali
to/configs/php/ /home/.sites/70/site4/test.php
This uses /usr/bin/php explicitly. "user" is an admin user on site4 and I've
specified all necessary folders with -d
The content of test.php is:
<?php
// test
echo realpath(".");
?>
I'm seeing admin emails containing:
PHP Warning: realpath(): open_basedir restriction in effect. File(/) is not
within the allowed path(s):
(/home/.sites/70/site4/:/tmp/:/var/lib/php/session/:/usr/sausalito/configs/p
hp/) in /home/.sites/70/site4/test.php on line 3
So even though I explicitly listed /home/.sites/70/site4/ as a permitted
folder, it's not working.
If I change /etc/crontab to use the "#!/usr/bin/php" trick that D mentioned,
I get:
PHP Warning: realpath(): open_basedir restriction in effect. File(/) is not
within the allowed path(s):
(/tmp/:/var/lib/php/session/:/usr/sausalito/configs/php/) in
/home/.sites/70/site4/test.php on line 3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20120428/a69921c3/attachment.html>
More information about the Blueonyx
mailing list