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:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 09:31
> To: [EMAIL PROTECTED]
> 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" <[EMAIL PROTECTED]> wrote in message
> Stuart J. Browne> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>
> >>  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:[EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to