Re: #!/path/to/php at top of output from CGI
| From: | Jason Brooke | Date: | Fri, 05 Jan 2001 03:31:20 +0000 |
| Subject: | Re: #!/path/to/php at top of output from CGI | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32811@lists.php.net to get a copy of this message | ||
Then there's probably already a php handler for the extension you have on
the file so it gets output as plain text, being outside the <? tag
jason
----- Original Message -----
From: "Jeff Davis" <jdavis@wasabimg.com>
To: <php-general@lists.php.net>
Sent: Friday, January 05, 2001 1:15 PM
Subject: Re: [PHP] #!/path/to/php at top of output from CGI
> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>