RE: Re[2]: [PHP] Problem with PHP as CGI
| From: | ..s.c.o.t.t.. | Date: | Thu, 24 May 2001 09:16:03 +0000 |
| Subject: | RE: Re[2]: [PHP] Problem with PHP as CGI | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-54164@lists.php.net to get a copy of this message | ||
as a test, try removing the shebang line from your
script and running the PHP binary from the shell:
"/usr/local/bin/php myscript.php"
i've used the CGI version for months now with apache
for my website, and frequently use PHP from the shell
to test out ideas and code snippets.... and i've never
had any problems.....
> -----Original Message-----
> From: Richard Kurth [mailto:rkurth@pacifier.com]
> Sent: Thursday, May 24, 2001 09:31
> To: php-general@lists.php.net
> Subject: Re[2]: [PHP] Problem with PHP as CGI
>
>
> Hello Stuart,
> yes there is a <? as the first line of my script as a mater of facket
> I can run a script that looks like this and I still get the problem
>
> #!/usr/local/bin/php -q
> <?php
> echo "HELP";
> ?>
>
>
>
> Wednesday, May 23, 2001, 9:06:08 PM, you wrote:
>
> Stuart J. Browne> "Richard Kurth" <rkurth@pacifier.com> wrote in message
> Stuart J. Browne>
> news:10170849955.20010524073149@pacifier.com...
> >>
> >> I have php config as a cgi and I put this at the top of my script
> >>
> >> #!/usr/local/bin/php -q
> >>
> >> when ever I run this script at root in
> >> telnet I get this message below. >
> >> Error in argument 1, char 3: option not found
> >> Error in argument 1, char 3: option not found
>
> Stuart J. Browne> Code snippett would help, but it sounds as if the first
> line (after the
> Stuart J. Browne> hash-bang) is NOT <?.
>
> Stuart J. Browne> I've found that oddities occur without that as the first
> line of your
> Stuart J. Browne> script..
>
> Stuart J. Browne> bkx
>
>
>
>
>
>
> --
> Best regards,
> Richard
> mailto:rkurth@pacifier.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
>