CGI/CLI '#!php' handler doesn't skip LF if CR present
| Bug #21297 | CGI/CLI '#!php' handler doesn't skip LF if CR present | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2002-12-30 14:36 UTC | Modified: | 2003-01-07 18:45 UTC |
|
||||||
| From: | benjamin at rqdq dot com | Assigned: | ||||||||
| Status: | Closed | Package: | *General Issues | |||||||
| PHP Version: | 4CVS-2002-12-30 (dev) | OS: | Any | |||||||
| Private report: | No | CVE-ID: | None | |||||||
[2002-12-30 14:36 UTC] benjamin at rqdq dot com
a real simple one... in the cli sapi (checked latest in cvs) will check the first byte for '#' to see if it should skip past a script parser line... it will skip until it reaches CR or LF, but if it hits CR, the LF is left as the first byte to be executed by the engine, so the script produces output. example... #!c:\php4\php-cli.exe -c c:\php4\ [CR] [LF] <? ?>[EOF] will produce output - the LF. mostly a windows issue, but since i send code back and forth from unix & windows machines, sometimes i may have cr/lf in them - and it this would break there as well. -benjamin
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2003-01-07 18:45 UTC] iliaa@php.net