Click to See Complete Forum and Search --> : PHP 4.2.1 and Apache 2.039 - CGI option


wiwaniec
06-28-2002, 04:17 PM
Hi

I have read, and experienced, that the module option doesn't work.
Has anyone got to work the CGI option, using php.exe? On Windows 2000.

I have followed the instructions in php help file, some messages on this forum and few other web links - have added the settings:
ScriptAlias /php/ "e:/app/php/"
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php "e:/app/php/php.exe"

to httpd.conf, but always get the Bad Request error with message in Apache log:
Invalid URI in request GET /test/test.php HTTP/1.1

I assume Apache doesn't know what to do with .php file.
The same happens when I tried different options recommended in other topics.

The php.ini file is in c:\winnt directory and php works from the command line.

Has anyone actually got it to work?
I don't care too much that it is worse option than the module - I am brand new to PHP and simply would like to experiment on my local test server.
I can try the IIS option but would prefer Apache.

Thanks

Witold

Anon
06-28-2002, 05:19 PM
Hi,

It seems that PHP4 is not compleately ready for Apache 2.0.39. If you manage to get the very latest php 4.2.1 build (not Stable and not the binary distribution)it will work (I know I found it om php.net, but it seems gone now - but it works on my computer anyway...).

btw - I run php as a module instead of php.exe - itīs faster and more reliable.

Cheers,
Kalle

PS - you can download a copy of my dll at: http://215.217.143.132/php4apache2.dll and replace the existing dll in an ordinary 4.2.1 installation.