Re[2]: [PHP] Problem with PHP as CGI

2001-05-24 Thread Richard Kurth

Hello ..s.c.o.t.t..,
I fixed the problem it seems there was something wrong with the file
when it was uploaded to the server. It works now
I am using shebang lines because this script has to run
at root it runs other programs on the server that need to be run at
root. php is set up to just run scripts at the Command line. I have php
as a DSO for Apache.

Thursday, May 24, 2001, 2:19:35 AM, you wrote:

..s.c.o.t.t.. im not sure that i understand the question, but the way
..s.c.o.t.t.. i've got my apache/PHP configured, i dont ever see
..s.c.o.t.t.. the actual path to the PHP binary.

..s.c.o.t.t.. what type of problem are you having ??

..s.c.o.t.t.. PS: i never use shebang lines in my PHP scripts;
..s.c.o.t.t.. i have apache configured to handle *.php files
..s.c.o.t.t.. as PHP code.



 -Original Message-
 From: midget2000x [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 23, 2001 20:33
 To: Stuart J. Browne; [EMAIL PROTECTED]
 Subject: Re: [PHP] Problem with PHP as CGI
 
 
 This is not an answer, but a further question on this subject.  Do you (or
 anybody) know of a way to keep the path to PHP from showing up when the PHP CGI
 script is hit via HTTP?
 
 On Wed, 23 May 2001, Stuart J. Browne wrote:
  Richard Kurth [EMAIL PROTECTED] wrote in message
  [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
  
  Code snippett would help, but it sounds as if the first line (after the
  hash-bang) is NOT ?.
  
  I've found that oddities occur without that as the first line of your
  script..
  
  bkx
  
  
  
  -- 
  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]
 -- 
 ---
 providing the finest in midget technology
 
 -- 
 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]
 




-- 
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] Problem with PHP as CGI

2001-05-23 Thread Richard Kurth








 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. I configured php like this
 
 ./configure --with-mysql
 make
 make install
 
 I have set this up on a number of servers But I have never had this
 problem before any id why I am getting this.

Error in argument 1, char 3: option not found
Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s [-v] [-i] [-f file] |  {file [args...]}
  -q Quiet-mode.  Suppress HTTP Header output.
  -s Display colour syntax highlighted source.
  -f file  Parse file.  Implies `-q'
  -v Version number
  -c path  Look for php.ini file in this directory
  -a Run interactively
  -d foo[=bar]   Define INI entry foo with value 'bar'
  -e Generate extended information for debugger/profiler
  -z file  Load Zend extension file.
  -l Syntax check only (lint)
  -m Show compiled in modules
  -i PHP information
  -h This help




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]




Re: [PHP] Problem with PHP as CGI

2001-05-23 Thread Stuart J. Browne

Richard Kurth [EMAIL PROTECTED] wrote in message
[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

Code snippett would help, but it sounds as if the first line (after the
hash-bang) is NOT ?.

I've found that oddities occur without that as the first line of your
script..

bkx



-- 
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]




Re[2]: [PHP] Problem with PHP as CGI

2001-05-23 Thread Richard Kurth

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]




Re: [PHP] Problem with PHP as CGI

2001-05-23 Thread midget2000x

This is not an answer, but a further question on this subject.  Do you (or
anybody) know of a way to keep the path to PHP from showing up when the PHP CGI
script is hit via HTTP?

On Wed, 23 May 2001, Stuart J. Browne wrote:
 Richard Kurth [EMAIL PROTECTED] wrote in message
 [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
 
 Code snippett would help, but it sounds as if the first line (after the
 hash-bang) is NOT ?.
 
 I've found that oddities occur without that as the first line of your
 script..
 
 bkx
 
 
 
 -- 
 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]
-- 
---
providing the finest in midget technology

-- 
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]




RE: Re[2]: [PHP] Problem with PHP as CGI

2001-05-23 Thread ..s.c.o.t.t..

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]




RE: [PHP] Problem with PHP as CGI

2001-05-23 Thread ..s.c.o.t.t..

im not sure that i understand the question, but the way
i've got my apache/PHP configured, i dont ever see
the actual path to the PHP binary.

what type of problem are you having ??

PS: i never use shebang lines in my PHP scripts;
i have apache configured to handle *.php files
as PHP code.



 -Original Message-
 From: midget2000x [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 23, 2001 20:33
 To: Stuart J. Browne; [EMAIL PROTECTED]
 Subject: Re: [PHP] Problem with PHP as CGI
 
 
 This is not an answer, but a further question on this subject.  Do you (or
 anybody) know of a way to keep the path to PHP from showing up when the PHP CGI
 script is hit via HTTP?
 
 On Wed, 23 May 2001, Stuart J. Browne wrote:
  Richard Kurth [EMAIL PROTECTED] wrote in message
  [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
  
  Code snippett would help, but it sounds as if the first line (after the
  hash-bang) is NOT ?.
  
  I've found that oddities occur without that as the first line of your
  script..
  
  bkx
  
  
  
  -- 
  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]
 -- 
 ---
 providing the finest in midget technology
 
 -- 
 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]