| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2001-11-22 04:10 UTC] mfischer@php.net
  [2001-11-22 10:35 UTC] sander@php.net
  [2001-11-22 10:50 UTC] sander@php.net
  [2001-11-22 10:54 UTC] jmoore@php.net
  [2001-11-22 12:23 UTC] mfischer@php.net
  [2001-11-22 13:00 UTC] sander@php.net
  [2001-11-22 15:17 UTC] sniper@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 09:00:01 2025 UTC | 
#!/path/to/php shows up at the top of every php script -- script -- #!/path/to/php <?php phpinfo();?> -- /script -- Running latest php4 CVS as CGI, Apache 1.3.20, no modules A similar bug was reported in the past (#9041, #8898, #8782) but I'm running the latest CVS. The following modification seemed to do the trick: ? .cgi_main.c.swp ? cdig.diff Index: cgi_main.c =================================================================== RCS file: /repository/php4/sapi/cgi/cgi_main.c,v retrieving revision 1.138 diff -u -r1.138 cgi_main.c --- cgi_main.c 11 Nov 2001 23:11:23 -0000 1.138 +++ cgi_main.c 22 Nov 2001 08:09:48 -0000 @@ -729,18 +729,18 @@ } file_handle.filename = argv0; file_handle.opened_path = expand_filepath(argv0, NULL TSRMLS_CC); - } else if (retval == SUCCESS) { - /* #!php support */ - c = fgetc(file_handle.handle.fp); - if (c == '#') { - while (c != 10 && c != 13) { - c = fgetc(file_handle.handle.fp); /* skip to end of line */ - } - CG(zend_lineno)++; - } else { - rewind(file_handle.handle.fp); + } + /* #!php support */ + c = fgetc(file_handle.handle.fp); + if (c == '#') { + while (c != 10 && c != 13) { + c = fgetc(file_handle.handle.fp); /* skip to end of line */ } + CG(zend_lineno)++; + } else { + rewind(file_handle.handle.fp); } + switch (behavior) { case PHP_MODE_STANDARD: