php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13737 #!/usr/local/bin/php shell script line is shown first at the result page
Submitted: 2001-10-18 10:39 UTC Modified: 2002-02-09 19:49 UTC
From: pgalan at cscamaras dot es Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.5 OS: Solaris 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pgalan at cscamaras dot es
New email:
PHP Version: OS:

 

 [2001-10-18 10:39 UTC] pgalan at cscamaras dot es
If I run the following example:

#!/usr/local/bin/php
<?
        print "<br>Hello Word";
?>

I got the following result page:

#!/usr/local/bin/php
Hello World 

The configure options are:

./configure --with-config-file-path=/usr/local/lib --disable-debug --enable-ftp --with-informix=$INFORMIXDIR  --enable-t
rans-sid  --with-pgsql=/usr/local/pgsql --with-mysql

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-18 21:27 UTC] sniper@php.net
Duplicate of #9041
 [2001-10-19 02:07 UTC] pgalan at cscamaras dot es
I have solved it by making the changes recomended in bug id 9040.

Locate the $PHP_INSTALL_PATH/sapi/cgi/cgi_main.c and make the following changes:

*** sapi/cgi/cgi_main.c.origSun Dec  3 02:09:13 2000
--- sapi/cgi/cgi_main.cWed Jan 24 16:39:34 2001
            ***************
            *** 719,725 ****
              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 == '#') {
            --- 719,726 ----
              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 == '#') {
 [2002-02-09 19:49 UTC] mfischer@php.net
This bug has been fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 09:01:28 2024 UTC