Re: running php as cgi script
| From: | Marco Tabini | Date: | Sat, 16 Nov 2002 04:04:56 +0000 |
| Subject: | Re: running php as cgi script | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-124691@lists.php.net to get a copy of this message | ||
Joseph, I think he's trying to run the script from the shell--in which
case it looks okay to me (besides perhaps a terminating semicolon on the
last line)
Marco
--
------------
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com
On Fri, 2002-11-15 at 23:12, bahwi wrote:
> That is in no way a correct php program. What error are you getting on
> the page? Or are you seeing the source? If you are seeing the source
> when you try to view the script it is a problem on their end(they may
> want them named as .cgi instead of .php, although rare now, this might
> be how they are doing it).
>
> --Joseph Guhlin
> http://www.bahwi.cc/
> Web Developer / Unix Consultant
>
>
> Scott wrote:
>
> >I'm trying to run a simple test php script as a cgi script on my ISP's server
> >and haven't been able to get it to work, although according them it is
> >possible.
> >
> >I have an example from a book which gives the following steps:
> >
> >1. Put the script in the cgi-bin
> >2. run chmod 755
> >3. include "#!/usr/bin/php" at the top. (I have checked that this is the
> >correct location of php on the server)
> >
> >The test script they give looks like this:
> >
> >#!/usr/bin/php
> >
> >echo "This is a small CGI program."
> >
> >Doesn't look like the usual php syntax to me, but I guess this is different.
> >Anyway I've tried it a bunch of different ways and it hasn't worked and I
> >haven't been able to find much on the subject from Google.
> >Can someone tell me where I'm going wrong?
> >
> >Thanks,
> >SW
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>