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" <[EMAIL PROTECTED]> 撰寫於郵件新聞 > :[EMAIL PROTECTED] > > 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 > > <?php > > echo "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" <[EMAIL PROTECTED]> 撰寫於郵件新聞 > > :[EMAIL PROTECTED] > > > 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 > > > Tony. > > > > > > > > > > > > > > > > > -- > PHP Install Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]