note 108540 added to function.ini-set
| From: | Anonymous | Date: | Fri, 04 May 2012 22:33:56 +0000 |
| Subject: | note 108540 added to function.ini-set | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187478@lists.php.net to get a copy of this message | ||
Open_basedir is a tricky one. Subsequent calls of ini_set('open_basedir', ...) will only
succeed if you either leave the value unchanged, take out a directory from the list completely, or
narrow a directory. Also, you cannot add a directory to the list not already within the tightened
open_basedir value.
<?php
ini_set('open_basedir', '/var/www/my_app/:/var/www/framework/'); // success if
not yet set
ini_set('open_basedir', '/var/www/my_app/:/var/www/framework/'); // success
still
ini_set('open_basedir', '/var/www/my_app/somepath/:/var/www/framework/'); //
success
ini_set('open_basedir', '/var/www/my_app/somepath/'); // success
ini_set('open_basedir', '/var/www/my_app/'); // fails completely
ini_set('open_basedir', '/var/www/my_app/somepath/:/var/www/framework/'); //
fails completely
?>
----
Server IP: 192.41.42.26
Probable Submitter: 173.37.200.9
----
Manual Page -- http://www.php.net/manual/en/function.ini-set.php
Edit -- https://master.php.net/note/edit/108540
Del: integrated -- https://master.php.net/note/delete/108540/integrated
Del: useless -- https://master.php.net/note/delete/108540/useless
Del: bad code -- https://master.php.net/note/delete/108540/bad+code
Del: spam -- https://master.php.net/note/delete/108540/spam
Del: non-english -- https://master.php.net/note/delete/108540/non-english
Del: in docs -- https://master.php.net/note/delete/108540/in+docs
Del: other reasons-- https://master.php.net/note/delete/108540
Reject -- https://master.php.net/note/reject/108540
Search -- https://master.php.net/manage/user-notes.php