Re: Re: PHP path shown on browser
| From: | Steven Cayford | Date: | Sun, 20 Jan 2002 17:34:29 +0000 |
| Subject: | Re: Re: PHP path shown on browser | ||
| References: | 1 2 3 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-5637@lists.php.net to get a copy of this message | ||
I don't know if this is exactly the problem but check out http://www.php.net/manual/en/security.cgi-bin.php
Under case 4 at the bottom it has a referce to a compile time option --enable-discard-path which sounds like what you're looking for. Or else put the binary in your cgi-bin directory?
-Steve
On 2002.01.20 06:14:16 -0600 Tony wrote:
FYI The version of my PHP is 4.1.1 "Tony" <tyknight@writeme.com> ¼¶¼g©ó¶l¥ó·s»D :20020120121603.51197.qmail@pb1.pair.com... I have fixed the problem. The problem came out because PHP cannot access php.ini. "#!/usr/local/bin/php" will disappear once PHP can read the doc_root in php.ini. However, i got another problem. If i run a problem that involve many php files, many "#!/usr/local/bin/php" will appear on the browser. If works fine if the program is just a php file. For example : Case I ---------------------------- #!/usr/local/bin/php <?print "Hello World";?> ----------------------------- It works fine. Case II ---- index.php ------------------ #!/usr/local/bin/php <?phpecho "Hello World!"; require("config.php"); echo "Hello World?";?> ----- config.php --------------------- #!/usr/local/bin/php <?php echo "In configure file"; ..... ?> ----------------------------------- The result is Hello World! #!/usr/local/bin/php In configure file Hello World? i know the reason. PHP treat "#!/usr/local/bin/php" in config.php as html. Simply remove "#!/usr/local/bin/php" in config.php can fix the problem. However, it is very time-consuming to find out which files should take away the line. Does someone know how to modify the source code so that "#!/usr/local/bin/php" will be ignored or the lines starting with "#" will be treated as commend. If you have no time to tell me the step, just tell me what file I should modify or give me some hints. Thanks "Tony" <tyknight@writeme.com> ¼¶¼g©ó¶l¥ó·s»D :20020119174617.84910.qmail@pb1.pair.com...Hi all, I got a problem when i run php as a CGI binary. I wrote a php script as follow #!/usr/local/bin/php <? print "Hello World"; ?> however, i got the following result when i called it from browser #!/usr/local/bin/php Hello World The path of PHP is always shown at the top of the browser. Does anyone know the solution? Thanks-- PHP Install Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-install-unsubscribe@lists.php.net For additional commands, e-mail: php-install-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.netTony.