From:             php at ideacode dot com
Operating system: Linux
PHP version:      5.2.4
PHP Bug Type:     Feature/Change Request
Bug description:  set_include_path('') doesn't work as expected

Description:
------------
There are legitimate "secure-operation" situations when you want the
include path wiped out, so that all included files must be explicitly
stated.

The obvious way to set this is with either:
set_include_path(''); // or
ini_set('include_path', '');

However, neither one of these sets the include path to '' on the latest
version of PHP 4 or PHP 5 in Linux.

A non-obvious workaround is to use a whitespace string:
set_include_path(' '); // or
ini_set('include_path', ' ');

which does set the path to ' ' (which hopefully isn't a valid
directory!).

I believe passing a lambda string to either set_include_path or
ini_set('include_path') should set the path to the lambda string.

http://bytejar.com/ - Software Lessons Learned the Hard Way

Reproduce code:
---------------
$original_path = set_include_path('');


Expected result:
----------------
'' === get_include_path();

Actual result:
--------------
$original_path === get_include_path();

-- 
Edit bug report at http://bugs.php.net/?id=42517&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42517&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42517&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42517&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42517&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42517&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42517&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42517&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42517&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42517&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42517&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42517&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42517&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42517&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42517&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42517&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42517&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42517&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42517&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42517&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42517&r=mysqlcfg

Reply via email to