|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-10-18 21:04 UTC] sniper@php.net
[2002-04-10 18:46 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 20:00:01 2025 UTC |
When running PHP either as a CGI or through mod_php, including the #! line causes it to be included in the output. When running as CGI this trips up the browser, when running through mod_php it just appears as an additional part of the display HTML document. The check is in the source code, but it's ignored. The patch to fix is: *** sapi/cgi/cgi_main.c Thu Oct 18 07:01:34 2001 --- sapi/cgi/cgi_main.c.orig Thu Oct 18 06:19:44 2001 *************** *** 699,706 **** return FAILURE; } file_handle.filename = argv0; ! } ! if (file_handle.handle.fp && file_handle.handle.fp!=stdin) { /* #!php support */ c = fgetc(file_handle.handle.fp); if (c == '#') { --- 699,705 ---- return FAILURE; } file_handle.filename = argv0; ! } else if (file_handle.handle.fp && file_handle.handle.fp!=stdin) { /* #!php support */ c = fgetc(file_handle.handle.fp); if (c == '#') {