|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-06-17 01:00 UTC] php at isnoop dot net
Description:
------------
In previous versions of PHP, set_include_path() would return the previously set path after setting the new path passed to it.
In my tests, set_include_path() returns false and does not set the path as it should. This behavior is the same whether the path to be set exists or not.
The data in the Expected Result field can be seen with 5.1.2 and 5.2.6.
The Actual Result data has been replicated in the following snaps:
5.3-200804251630
5.3-200806162030
5.3-200806172030
Reproduce code:
---------------
echo "<pre>getting: ".get_include_path()."\n";
echo "setting: ".set_include_path("/NEWPATH")."\n";
echo "getting: ".get_include_path();
Expected result:
----------------
getting: /websites/example/htdocs:/websites/example/inc/
setting: /websites/example/htdocs:/websites/example/inc/
getting: /NEWPATH
Actual result:
--------------
getting: /websites/example/htdocs:/websites/example/inc/
setting:
getting: /websites/example/htdocs:/websites/example/inc/
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 14:00:01 2025 UTC |
Using ini_set("include_path", $path) has equivalent results.Works fine with php.ini-dist [dmitry@tpl CGI-DEBUG]$ cat bug45288.php <?php echo "getting: ".get_include_path()."\n"; echo "setting: ".set_include_path("/NEWPATH")."\n"; echo "getting: ".get_include_path()."\n"; [dmitry@tpl CGI-DEBUG]$ sapi/cli/php bug45288.php getting: .:/home/dmitry/php/usr/php5.3-debug/share/pear setting: .:/home/dmitry/php/usr/php5.3-debug/share/pear getting: /NEWPATH