Edit report at http://bugs.php.net/bug.php?id=48930&edit=1

 ID:               48930
 Comment by:       daniel dot haas at cn-consult dot eu
 Reported by:      adam-phpbugs at adam dot gs
 Summary:          __COMPILER_HALT_OFFSET__ incorrect in PHP>=5.3
 Status:           Assigned
 Type:             Bug
 Package:          Scripting Engine problem
 Operating System: *
 PHP Version:      5.3, 6
 Assigned To:      scottmac

 New Comment:

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??


Previous Comments:
------------------------------------------------------------------------
[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 :)

------------------------------------------------------------------------
[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] scott...@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.

------------------------------------------------------------------------
[2009-07-16 00:23:45] ka...@php.net

Scott, you worked on the re2c switch, any chance you can clarrify this
one?

------------------------------------------------------------------------


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

Reply via email to