Help with php cgi

ldl

Joined: 2002-09-22
Posts: 3
Posted: Sun, 2002-09-22 18:45

Well I'm trying to install gallery but my host has safemode on. So I downloaded the correct cgi binary followed the instructions to the letter (except changing to the correct dirs) when I try to call the cgi by it self I get a 500 error. When I try to open /gallery/ I get a blank page (viewing the source shows me the php source) and if I try to view a php file (phpinfo.php) ie prompts me to save the file.

Soo I'm wondering if anyone has any suggestions or any websites/howto's with phpcgi info.

Thank you all.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2002-09-22 21:08
Quote:
when I try to call the cgi by it self I get a 500 error

This is a key problem. It means that the CGI binary you've installed isn't working properly. This is almost always accompanied by an entry in your error log explaining what went wrong. Start by looking there and let us know what you turn up.

Also, try running the cgi by hand from a shell prompt. If that doesn't work, you may have the wrong PHP cgi binary for your platform, or you may have transferred it to your webserver incorrectly (like you might have used ASCII mode instead of BINARY mode when you ftp'd it).

 
ldl

Joined: 2002-09-22
Posts: 3
Posted: Mon, 2002-09-23 02:13

EDIT: I fixed the error log

[Sun Sep 22 21:26:34 2002] [error] [client 66.11.zzz.yyy] Premature end of script headers: /home/virtual/site34/fst/var/www/cgi-bin/php.cgi

Also unfortunatly I'm not quite sure how to repair this

unfortunatly I don't have shell access :sad:

there are only 3 binaries two bsd and one linux. The server is using linux.

For some reason tho, there is nothing about the 500 in the error log.

I did upload it in binary mode.

Are there anyother sources for binaries (as i have nothing to compile it on) then the site linked in your faq?

thanks

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2002-09-23 07:34

Hmm. Did you make sure that php.cgi is executable? (ie, "chmod 755 php.cgi").
You might want to ask your ISP to help out here; there are a lot of weird settings
that they could be imposing that would prevent this from working.

 
Cus
Cus's picture

Joined: 2002-09-03
Posts: 11
Posted: Mon, 2002-09-23 12:41
Quote:
Hmm. Did you make sure that php.cgi is executable? (ie, "chmod 755 php.cgi").
You might want to ask your ISP to help out here; there are a lot of weird settings
that they could be imposing that would prevent this from working.

I'll just jump in here and ask if anyone knows what might be causing this error - safemode enabled server, php.cgi is set executable (755) and getting a server error 500 when trying to access sitename/php-cgi/gallery/setup/phpinfo.php....

[Tue Sep 24 00:26:04 2002] [alert] [client 203.98.xxx.yyy] /var/www/sitename/htdocs/php-cgi/gallery/setup/.hta
ccess: php_value not allowed here

Cus

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-09-24 02:19

Cus, this is FAQ C.

 
Cus
Cus's picture

Joined: 2002-09-03
Posts: 11
Posted: Tue, 2002-09-24 04:20

Darn - You're right of course - I was too busy looking in FAQ2 for apossible answer (and it WAS very late here!)

Thanks Again!