From: ganswijk at xs4all dot nl Operating system: irrelevant PHP version: 5.3CVS-2008-08-25 (CVS) PHP Bug Type: Feature/Change Request Bug description: include() environment during eval()
Description: ------------ I noticed that during the execution of an eval() the environment for an include() is kept the same as that of the original script executing the eval() but this probably often isn't the case, for example in the case of user contributed code to 'eval()'. To overcome this problem I currently use: $cwd=getcwd(); chdir(code-environment-of-code-to-eval); eval(code-to-eval); chdir($cwd); But perhaps this could be solved in a better way? Because in this I am assuming that the data environment is the same as the code environment for the code to eval(). BTW. I notice that PHP often makes no distinction between the current working directory for code and for data. I think that all the PHP definitions should be rewritten to make this distinction in all relevant cases. BTW2. Perhaps there should even be different workspaces for input and output data files... -- Edit bug report at http://bugs.php.net/?id=45913&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45913&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45913&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45913&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45913&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45913&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45913&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45913&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45913&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45913&r=support Expected behavior: http://bugs.php.net/fix.php?id=45913&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45913&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45913&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45913&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45913&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45913&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45913&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45913&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45913&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45913&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45913&r=mysqlcfg
