#21297 [Opn->Csd]: CGI/CLI '#!php' handler doesn't skip LF if CR present

From: Date: Wed, 08 Jan 2003 00:45:39 +0000
Subject: #21297 [Opn->Csd]: CGI/CLI '#!php' handler doesn't skip LF if CR present
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29382@lists.php.net to get a copy of this message
ID: 21297 Updated by: iliaa@php.net Reported By: benjamin@rqdq.com -Status: Open +Status: Closed Bug Type: *General Issues Operating System: Any PHP Version: 4CVS-2002-12-30 (dev) New Comment: This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-12-30 14:36:08] benjamin@rqdq.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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21297&edit=1

« previous php.bugs (#29382) next »