Bug #48930 [Asn->Csd]: __COMPILER_HALT_OFFSET__ incorrect in PHP>=5.3
| From: | felipe@php.net | Date: | Sun, 27 Jun 2010 21:46:13 +0000 |
| Subject: | Bug #48930 [Asn->Csd]: __COMPILER_HALT_OFFSET__ incorrect in PHP>=5.3 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151915@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=48930&edit=1
ID: 48930
Updated by: felipe@php.net
Reported by: adam-phpbugs at adam dot gs
Summary: __COMPILER_HALT_OFFSET__ incorrect in PHP>=5.3
-Status: Assigned
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: *
PHP Version: 5.3, 6
Assigned To: scottmac
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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] jani@php.net
Nevermind, of course it's still borked since the check is NOT done in
scanner. :)
------------------------------------------------------------------------
[2009-09-09 19:56:40] jani@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 :)
------------------------------------------------------------------------
[2009-08-30 22:56:02] adam-phpbugs at adam dot gs
Understandably this might be a bit hackish to have use a global variable
here, but perhaps thats preferable to what i'd consider a major
regression?
I attempted to patch this so I could just submit a patch here, but
unfortunately my c-fu and my understanding of PHP internals is lacking.
------------------------------------------------------------------------
[2009-08-03 03:06:47] scottmac@php.net
The sapi/cli/php_cli.c code will read forward when it see's a shebang
to the next line. The file is already seeked by the time the scanner
gets a change to look at it.
The zend_get_scanned_file_offset() doesn't know about this because by
the time the scanner is started the bytes are already long gone.
Short of a global variable I'm not seeing a clean way to fix this.
------------------------------------------------------------------------
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