Re: [PHP] php like cgi

2001-04-18 Thread Alexander Skwar

So sprach Dddogbruce (@home.com) am Mon, Apr 16, 2001 at 03:12:25PM -0700:
 ?
 $greeting = "Hello!"
 echo "$greeting"
 ?

Since I also have this problem, I tried your suggestion, and it didn't work. 
However, I expected this, because apache doesn't know which interpreter to
use to exec this script.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die gnstige Art an Linux Distributionen zu kommen
Uptime: 1 day 10 hours 24 minutes

--
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] php like cgi

2001-04-17 Thread Christian Reiniger

On Monday 16 April 2001 22:40, you wrote:
 Hi..

   I'm tring to use a php-script like cgi, but the only thing i got is
 "Internal Server Error..."

  That's my test-script..
 ---
 #!/bin/php -q

Are you 100% sure that it's /bin/php ? That's a pretty unusual location 
for PHP to be installed in. /usr/bin/php or /usr/local/bin/php are the 
common ones



 ?php
  echo "Content-type: text/html\n\n";

unneccessary if you leave out the -q

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

"Never doubt that a small group of thoughtful, committed people can
change the world...
Indeed, it's the only thing that ever has."

- Margaret Mead

--
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] php like cgi

2001-04-17 Thread Ulysses Almeida


On Tue, 17 Apr 2001, Christian Reiniger wrote:
 Are you 100% sure that it's /bin/php ? That's a pretty unusual location 
 for PHP to be installed in. /usr/bin/php or /usr/local/bin/php are the 
 common ones

Yeah, my php interpreter is on /usr/bin/php, i just made a symlink on
/bin...,  but it's not the  problem, i tried with /usr/bin/php too!

 
 
 unneccessary if you leave out the -q
 
  I note this, i was just in test, 'cos without "q" dos not work too...

  I can execute the script on command line, and i get the expected output, 
but when i request it on my browser i get the Internal Server Error...

.~.  Ulysses Almeida
   / V \  [EMAIL PROTECTED]
 / (   ) \  Seja livre, use GNU/Linux!
   ^^-^^
 


-- 
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] php like cgi

2001-04-16 Thread Ulysses Almeida


Hi..

  I'm tring to use a php-script like cgi, but the only thing i got is
"Internal Server Error..."

 That's my test-script..
---
#!/bin/php -q

?php
 echo "Content-type: text/html\n\n";

 echo "Hello World!\n";

?


  I tried whithout "-q" and "echo "Content-", but i got the same
error!

  That's my httpd_error.log
-
[Mon Apr 16 17:19:24 2001] [error] [client 127.0.0.1] Premature end of
script headers: /home/httpd/cgi-bin/teste.cgi


  How can i do it? I have bash, perl, C, cgis working here, just my
php-script dosn't work.

  Before asking, Yeah, i need to exec it like cgi, 'cos that was the only
way that i find to use posix_setuid().

  Thanks...

 []s
.~.  Ulysses Almeida
   / V \  [EMAIL PROTECTED]
 / (   ) \  Seja livre, use GNU/Linux! 
   ^^-^^


-- 
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] php like cgi

2001-04-16 Thread Dddogbruce \(@home.com\)

?
$greeting = "Hello!"
echo "$greeting"
?

g


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