From: bart at mediawave dot nl Operating system: WinXP PHP version: 5.0.3 PHP Bug Type: Scripting Engine problem Bug description: Strange parser errors with eval
Description: ------------ My script depends heavily on eval and since I upgraded to PHP 5.0.3 everything completely broke down. (I think I was using 5.0.0 before I upgraded) (And yes, I know, Using eval() is a very dirty thing to do ;) ) After hours and hours of pinpointing I found out that things go wrong when code is running through eval(). The same code running directly (without eval()) runs flawlessly. It looks like there are some parsing problems with eval() or something. I'm also getting weird ODBC problems as soon as correctly working code runs through eval(): Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver]Invalid use of null pointer , SQL state S1009 in SQLExecDirect in D:\php\includes\sp6\modules\bwceval.php(33) : eval()'d code on line 24 I got the above warning out of the command line version of PHP since IIS only gave me a: CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Anywayz. I've got some very simple code that reproduces my problem: Reproduce code: --------------- <?php echo 'hello'; $myvar = 'Why did the chicken cross the road?'; $string = " echo 'hello'; $myvar = 'Why did the chicken cross the road?'; "; eval ($string); ?> Expected result: ---------------- hellohello Actual result: -------------- hello Parse error: syntax error, unexpected T_STRING in D:\Inetpub\wwwroot\test4.php(24) : eval()'d code on line 5 -- Edit bug report at http://bugs.php.net/?id=31339&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31339&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31339&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31339&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31339&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31339&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31339&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31339&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31339&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31339&r=support Expected behavior: http://bugs.php.net/fix.php?id=31339&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31339&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31339&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31339&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31339&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31339&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31339&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31339&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31339&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31339&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31339&r=mysqlcfg
