Click to See Complete Forum and Search --> : Premature end of script headers =(


Anon
09-15-2001, 06:21 AM
Hello, I am running windows 2000, apache 1.3.20, and php 4.0.6. I am trying
to set it up so that I could access my webpage as http://www.site.com/script/1/2 as opposed to http://www.site.com/script.php?var1=1&var2=2. I am using a method similar to the one descriped here:
http://www.evolt.org/article/Search_Engine_Friendly_URLs_with_PHP_and_Apache/17/15049/index.html.

For some reason, if I use PHP as a CGI and access any script with a "/" after it (http://www.site.com/script.php/) it causes a 500 error and this message in the error log: "Premature end of script headers: c:/php/php.exe".

If I access the same URL using PHP as an apache module, I have no problems. But, there seems to be some memory leaks in the module so I want to to use the CGI instead.

Does anyone know why it won't work in CGI mode or maybe what I am doing wrong?

This is my config for the CGI mode:
ScriptAlias /php/ "C:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"


Thanks!
-Jobarr

Anon
05-11-2002, 09:30 AM
I have the same problem. I am also trying to do the same thing, but I know the script that I am using works because it works on Linux!

Alex Davies