Apache Problems (1.3)

Status
Not open for further replies.
Here is something from the PHP Install file that comes with the source download:
Installing PHP on Windows with Apache 1.3.x

There are two ways to set up PHP to work with Apache 1.3.x
on Windows. One is to use the CGI binary (php.exe),
the other is to use the Apache module dll. In either case
you need to stop the Apache server, and edit your
srm.conf or httpd.conf to configure Apache to work with PHP.

Although there can be a few variations of configuring PHP
under Apache, these are simple enough to be used by the
newcomer. Please consult the Apache Docs for further
configuration directives.

Now that version 4.1 introduces a safer sapi module, we recommend
that you configure PHP as a module in Apache.

To do this, you should move php4ts.dll to the windows/system (for Windows 9x/Me)
or winnt/system32 (for Windows NT/2000/XP) directory, overwriting any
older file. Then you should add the following three lines to your Apache
conf file: (swap c:/php/ for your PHP install path)

LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

If you wish to install PHP as a CGI binary, (the sapi is much better)
you need to enable the apache security fix in your php.ini by
setting cgi.force_redirect = 1. Then, insert these lines to your conf file:

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

I'd recommend the module based installation, as its a bit faster and the SERVER variables setup will be similar to your hosts. (Most hosts configure PHP as a module)

A step by step procesure:
1) Move the php4ts.dll to the your winnt/system directory.
2) Add
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
to the httpd.conf file in the conf folder of apache.
3) Restart your server.

Remember to change the c:/php/sapi/php4apache.dll in the 2nd step to something that corresponds your php4apache.dll filepath, ok?

I think this should do it. Think!
 
Status
Not open for further replies.
Back
Top Bottom