|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17898 PHP path shown on browser
Submitted: 2002-06-21 10:40 UTC Modified: 2002-06-21 12:13 UTC
From: tyknight at writeme dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.2.0 OS: Linux 2.4.17
Private report: No CVE-ID: None
 [2002-06-21 10:40 UTC] tyknight at writeme dot com
i run php as a CGI binary. I found that if i use "require" to import another php file, "#!/usr/local/bin/php" appears in the browser.

For example :
Case I
     print "Hello World";
It works fine.

Case II
---- index.php ------------------
    echo "Hello World!";
    echo "Hello World?";
----- config.php ---------------------
   echo "In configure file";
The result is

Hello World!
In configure file
Hello World?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-21 12:13 UTC]
Of coures it does! How should it know to ignore the #! line? It's just normal code. The CGI and CLI will ignore the first line of your script if you start it directly.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 07:03:37 2023 UTC