Edit report at http://bugs.php.net/bug.php?id=48930&edit=1
ID: 48930 User updated by: adam-phpbugs at adam dot gs Reported by: adam-phpbugs at adam dot gs Summary: __COMPILER_HALT_OFFSET__ incorrect in PHP>=5.3 Status: Closed Type: Bug Package: Scripting Engine problem Operating System: * PHP Version: 5.3, 6 Assigned To: felipe New Comment: Hi felipe, Thanks for taking a look at this bug, its languished for (what i'd consider) far too long. Unfortunately it doesn't seem to fix the issue: -=[~/Scripts/compile/php5.3-201006272030]=- -=[Sun Jun 27]=- -=[18:14:16]=- [a...@nighe]$ ./sapi/cli/php -v PHP 5.3.3RC2-dev (cli) (built: Jun 27 2010 17:54:04) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies -=[~/Scripts/compile/php5.3-201006272030]=- -=[Sun Jun 27]=- -=[18:15:11]=- [a...@nighe]$ php -v PHP 5.3.1 (cli) (built: Dec 26 2009 19:21:45) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies -=[~/Scripts/compile/php5.3-201006272030]=- -=[Sun Jun 27]=- -=[18:15:15]=- [a...@nighe]$ ./sapi/cli/php test-without-shebang.php string(19) " this is test data " -=[~/Scripts/compile/php5.3-201006272030]=- -=[Sun Jun 27]=- -=[18:15:30]=- [a...@nighe]$ ./sapi/cli/php test-with-shebang.php string(40) "); __halt_compiler(); this is test data " -=[~/Scripts/compile/php5.3-201006272030]=- -=[Sun Jun 27]=- -=[18:15:34]=- [a...@nighe]$ php test-with-shebang.php string(40) "); __halt_compiler(); this is test data " -=[~/Scripts/compile/php5.3-201006272030]=- -=[Sun Jun 27]=- -=[18:15:38]=- [a...@nighe]$ php test-without-shebang.php string(19) " this is test data " -=[~/Scripts/compile/php5.3-201006272030]=- -=[Sun Jun 27]=- -=[18:15:44]=- [a...@nighe]$ cat test-without-shebang.php <?php $fh=fopen(__FILE__,"r"); fseek($fh,__COMPILER_HALT_OFFSET__); var_dump(fread($fh,1024)); fclose($fh); __halt_compiler(); this is test data -=[~/Scripts/compile/php5.3-201006272030]=- -=[Sun Jun 27]=- -=[18:15:54]=- [a...@nighe]$ cat test-with-shebang.php #!/usr/local/bin/php <?php $fh=fopen(__FILE__,"r"); fseek($fh,__COMPILER_HALT_OFFSET__); var_dump(fread($fh,1024)); fclose($fh); __halt_compiler(); this is test data Previous Comments: ------------------------------------------------------------------------ [2010-06-27 23:46:18] fel...@php.net Automatic comment from SVN on behalf of felipe Revision: http://svn.php.net/viewvc/?view=revision&revision=300789 Log: - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) ------------------------------------------------------------------------ [2010-06-27 23:46:12] fel...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2010-05-26 11:32:44] daniel dot haas at cn-consult dot eu We also hit this bug, because we have a custom php-based installer that uses __halt_compiler() and __COMPILER_HALT_OFFSET__ to extract a tar.gz portion of the installer. Since PHP 5.3 our installers do not work anymore! :-( Is a fix not even planned at this stage?? ------------------------------------------------------------------------ [2009-09-09 20:02:00] j...@php.net Nevermind, of course it's still borked since the check is NOT done in scanner. :) ------------------------------------------------------------------------ [2009-09-09 19:56:40] j...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Since the shebang check was removed from scanner, isn't this issue solved then? (please try :) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=48930 -- Edit this bug report at http://bugs.php.net/bug.php?id=48930&edit=1