Problems with getting apache to load php...

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

DeGauss
Forum Contributor
Posts: 105
Joined: Tue Oct 22, 2002 9:44 am
Location: Gainesville, FL

Post by DeGauss »

Apache 2.0.43 and PHP 4.2.3 work together very well.

...The trick is to get them to START working together.

If you slog through all the user-contributed notes on php.net they explain why Apache 2 and PHP 4 don't work together. To cut a long story short, it's because the filter file (php4apache2.dll) that's distributed with the PHP 4.2.3 .zip file is not the correct version to work with Apache 2.0.43.

So how do you get it to work?

Simple - download the latest development version of PHP, which has the updated php4apache2.dll file in it.

As for my setup, i'll tell you how it's on my machine.

php4ts.dll + php4apache2.dll = c:\winnt\system32
php.ini = c:\winnt

Then in the httpd.conf...

LoadModule php4_module c:/winnt/system32/php4apache2.dll

AddIcon /icons/bomb.gif core .php .asp - (for my personal amusement ;) )

AddType application/x-httpd-php .php .asp - (because i like to fool people into thinking i'm writing ASP for them )

Now in php.ini...

include_path = "." - (so php executes in whatever directory, your call)

session.save_path = c:\temp (or wherever you keep your session data. A better place would be on the same root directory that your htdocs directory sits)

And that's it.

Everything else is just gumph.
Post Reply