Re: #!/path/to/php at top of output from CGI
| From: | Jeff Davis | Date: | Fri, 05 Jan 2001 03:15:07 +0000 |
| Subject: | Re: #!/path/to/php at top of output from CGI | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32809@lists.php.net to get a copy of this message | ||
Normal CGIs exucute just fine... C or perl or whatever. And I did a phpinfo()
call and it outputted as normal, just with a '#!/usr/local/bin/php' at the top.
Thanks,
Jeff Davis
On Thu, 04 Jan 2001, you wrote:
> It sounds like the webserver is not executing it - make sure you have a
> ScriptAlias directive for the directory you're trying to put it into. If you
> don't want it to be restricted to a ScriptAlias'd directory, you'll need to
> allow cgi execution outside it with Options ExecCGI. Check the Apache manual
> to be sure, and be aware of the security implications of running executables
> outside a ScriptAlias'd directory.
>
> jason
>
>
> > I compiled a version of php-4.0.4 as a cgi (I already installed a module
> > version, but I need a CGI too). When I make a file I put
> #!/usr/local/bin/php
> > at the top and chmod 755 to make it a valid cgi. Then I name it with a
> .cgi
> >> extension, and put it in the right directory. When I execute it from the
> shell
> > I get normal output, with no #!/usr/local/bin/php anywhere in the output.
> > However, when I run it as a CGI through a browser, I get a
> #!/usr/local/bin/php
> > at the top of the output. I have no idea how to make it stop doing that,
> but I
> > need to offer CGI execution for the sake of security (I use suEXEC).
> >
> > Thanks,
> > Jeff Davis
> > --
> > Jeff Davis
> > jdavis@dynworks.com
> > http://dynworks.com
--
Jeff Davis
jdavis@dynworks.com
http://dynworks.com