[PHP] Re: Removing the #!/usr... from cgi output?
Colin McDonald wrote: Did you try it without that line at all? I'm pretty sure you can setup apache (you are using apache right?) to use /usr/.../bin/php for all files with the extension .php colin David Brannlund wrote: Example: #!/usr/local/bin/php becomes #!/usr/local/bin/php foo Hi there yes , the shebang ( the #!/usr/local/bin/php ) is not needed for use with dynamic webpages wether they be perl , php or whatever Shebangs are used only with shell based scripts. Your webserver should be configured to know what to do with the file by extension, e.g. .php files should be processed by php in apache This link describes how to configure a webserver to do this http://www.php.net/manual/en/install.unix.php ( a unix server , but its nearly the same for windows ) Thanks Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Removing the #!/usr... from cgi output?
I think you can make the AddType location specific ie: in /home/httpd/html/cgi-bin all files ending in .php will be cgi php everywhere else /home/httpd/html/ will be php module the line at the top tells the parser which program should execute the code in the file ... so I think you don't add the AddType in apache and maybe something different? David Brannlund wrote: > Got it to work! I removed that line and configured apache to serve certain > filetypes through php cgi. (I have the php module installed, so i had to > come up with a new ext.) > > But there should be some way to write the script with #!.. and not get it > printed out anyway. Ah, well... > > Thanks. > > David Brannlund > > > "Colin McDonald" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED]... > >>Did you try it without that line at all? >> >>I'm pretty sure you can setup apache (you are using apache right?) to >>use /usr/.../bin/php for all files with the extension .php >> >>colin >> >>David Brannlund wrote: >> >>>Example: >>> >>> #!/usr/local/bin/php >>> >> print "foo"; >>> ?> >>> >>>becomes >>> >>> #!/usr/local/bin/php >>> foo >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php