From: timothy dot j dot gustafson at gmail dot com Operating system: FreeBSD 6.2 PHP version: 5.2.3 PHP Bug Type: Feature/Change Request Bug description: Would like to eval() in a separate code space
Description: ------------ I think it would be handy if there were a version of eval() that executed the code specified in a separate code space from the primary PHP execution. This would be tremendously handy when you're executing code from an untrusted source, for example if you wanted to create some sort of plug-in system for your web app that would allow the user's code to be executed on the web server, but in a more controlled environment than the main PHP script itself. When the user's code gets executed, it should not have access to any variables, other than perhaps the superglobals. It would be really nice if you could also specify a different php.ini file for this "virtual" execution, so you could do things like set open_basedir and disable_functions. Reproduce code: --------------- None! Expected result: ---------------- None! Actual result: -------------- None! -- Edit bug report at http://bugs.php.net/?id=41657&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41657&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41657&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41657&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41657&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41657&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41657&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41657&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41657&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41657&r=support Expected behavior: http://bugs.php.net/fix.php?id=41657&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41657&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41657&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41657&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41657&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41657&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41657&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41657&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41657&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41657&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41657&r=mysqlcfg