Please answer this simple SPAM challenge: min(nine, zero)?
(Example: nine)

The Note You're Voting On

kazink at gmail dot com
9 years ago
I had problems running php as CGI in thttpd. I have followed instructions posted by db at digitalmediacreation dot ch, but I was still getting "500 Internal Error" answer from the server. However, I had no problems running php as CLI using a simple wrapper file named index.cgi:

require_once 'index.php';

but i needed to pass user data through GET and POST, and this method couldn't handle it. I have spent 2 hours figuring out how to run the CGI mode properly, until I finally gave up, and done it in "manual" way. I have just added some code to the wrapper that reads GET and POST data into the proper variables:


//parse the command line into the $_GET variable
parse_str($_SERVER['QUERY_STRING'], $_GET);
//parse the standard input into the $_POST variable
   && (
parse_str(fread(STDIN, $_SERVER['CONTENT_LENGTH']), $_POST);


It works well for me. It may be useful if someone else have similar problem.

<< Back to user notes page

To Top