[SOLVED] Security Alert! The PHP CGI cannot be accessed d...

wilso122

Joined: 2005-01-14
Posts: 4
Posted: Fri, 2005-01-14 15:08

Hi,

All the files uplaoded correctly and the install wizard seemed to go through everything ok, but when I try and log in I get the following error.

--- begin error ---
Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
--- end error ---

go easy with me I have no a clue what I am doing... let me know if you need anything else, it was a pretty standard install. ie. just clicked nest to everything..

thanks Jz

----

Gallery URL http://www.heightsclimbing.co.uk/newgal:
Gallery version: 2?
Webserver (with version): apache uniz
Datatabase (with version): no idea
PHP version (eg 4.2.1): no idea
phpinfo URL (optional): ?
Graphics Toolkit(s): ?
Operating system: ?
Web browser/version: ie 6 odd...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-01-15 01:21

That's an Apache/PHP configuration issue. Looks like it's working now, so you must have resolved it.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-01-15 02:15

that's what i thought too, but it says above the error is when logging in, so maybe it isn't fixed?

 
anonymous11234

Joined: 2002-12-05
Posts: 135
Posted: Sat, 2005-01-15 19:56

I get the same error when logging in:

Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.

gallery URL: www.wreckdive.net/gallery2

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-01-15 21:40

Hm. I tried logging in, but I don't have a password so I can't verify it. I'm pretty confident that it's a Apache/PHP configuration issue, but it's unclear to me how one PHP page can work and another can fail..

Would it be possible for me to ssh to one of these servers and see it for myself?

 
wilso122

Joined: 2005-01-14
Posts: 4
Posted: Sun, 2005-01-16 11:35

Thanks for your comments so far, bharat, what do you mean dy ssh? I have ftp detail but it is a shared hosting web space thingy. It is a bit odd because 90 percent works perfectly as you can see, it is great btw. can I email you the ftp details and the admin log in details? would that help.

Many thanks - Jz

ps, if it turns out to be hosting problem do you know a free host that it will work on? thnks jz

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-01-18 04:06

The ftp details will probably be enough for me to figure it out, or at least take a crack at it. I don't know of any particularly good free hosts (you get what you pay for). But you can find plenty of cheap ones here.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-01-18 09:35

Both anonymous11234 and wilso122 were kind enough to give me ftp details and I figured it out. This is a bug in A4 that we've fixed since. We were using $_SERVER['SCRIPT_NAME'] to calculate the return url and that was accidentally picking up the /cgi-bin/php.cgi part of the path that you get when you use PHP/CGI. We've fixed that back in early December so upgrading to a newer nightly snapshot should resolve the problem for you.

Thanks for reporting it and letting me onto your servers, guys!

 
anonymous11234

Joined: 2002-12-05
Posts: 135
Posted: Tue, 2005-01-18 13:09

Thank you it works perfect now. I upgraded to the newest nightly (super easy upgrade interface) and that fixed it! What a great program gallery 2 is.

Thanks,
Chris

 
wilso122

Joined: 2005-01-14
Posts: 4
Posted: Tue, 2005-01-18 13:35

Thank you so much, the gallery is just excellent now all the members of our climbing club can post there pictures up, I can not recommend this enough, easy to set up, even for a novice like me and the support is better than ones you pay for.... GREAT...

Thanks for your help runs perfectly now.

 
mamoon

Joined: 2007-06-05
Posts: 1
Posted: Tue, 2007-06-05 06:57

Mamoon Rashid
hi bharat,
i am getting the same server error as discussed by wilson above, error is as follows-

Quote:
Security Alert! The PHP CGI cannot be accessed directly.

This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.

i am using Apache2, and trying to use PHP as cgi processor.As i submit through html form to action like "cgi-bin/action.php" the server throws above error.
please help me to fix the bug, in simple illustration so that i can folllow.
with regard
mamoon

 
rambabu pappala

Joined: 2008-07-15
Posts: 1
Posted: Tue, 2008-07-15 11:10
anonymous11234 wrote:
Both csilkman and wilso122 were kind enough to give me ftp details and I figured it out. This is a bug in A4 that we've fixed since. We were using $_SERVER['SCRIPT_NAME'] to calculate the return url and that was accidentally picking up the /cgi-bin/php.cgi part of the path that you get when you use PHP/CGI. We've fixed that back in early December so upgrading to a newer nightly snapshot should resolve the problem for you.

Thanks for reporting it and letting me onto your servers, guys!