Page 1 of 1

Configuring Apache for PHP on my PC

Posted: Tue Aug 06, 2002 10:00 pm
by zza1pqx
I find it awkward coming and asking for help from strangers because usually I can work things out for myself and so if I get stuck I can come into new places and at least appear informed.
As it is I come to you feeling like my Grandfather must have done when I asked him if he used webmail or POP3 on his new computer.. A little blank and confused as to what the question was again..
(Enough of the yabber ZZ) :oops:

I just set up Apache Server v.2.0.39 on my WindowsXP pro home PC.
That was easy enough and everything worked well.

Then I downloaded the latest PHP (4.2.2) from the php.net site.
As far as I am aware I have followed the instruction to the letter.
I copied php.ini to WINDOWS and set the path to my php folder.
I have put php4ts.dll into SYSTEM32.

The problem I have is when I try and setup apache to recognise php.
The install.txt file that comes with PHP 4.2.2 says that I should locate httpd.conf in my apache folder and edit it by adding this set of instructions to it.

Code: Select all

LoadModule php4_module c:/php/sapi/php4apache.dll
   AddModule mod_php4.c
   AddType application/x-httpd-php .php
I have altered the LoadModule to reflect my path to php4apache.dll

I have also ensured that the server was OFF when I did it.
The problem comes in that when I then restart apache I get an alert telling me that the requested operation has failed.

If I delete the code given by php from httpd.conf and restart apache then all is well. I also tried adding extraneous code : p (which is what I am feeling) and reloaded to find the same message appears.

My conclusion is that either the code is wrong for apache v2.0.39 from the php install file. Or that there is something I haven't done to make things work.

Incidentaly I have set Apache to monitor rather than open in a dialogue.

Any help would be sincerley greatfully recieved.
I just hope I haven't made myself look too much of a n00b! :lol:

Posted: Wed Aug 07, 2002 9:12 am
by hob_goblin
a) apache 2.x is considered very unstable with php4.x ... (i think)

b) did you put LoadModule with the other LoadModules? AddType with the other AddTypes? etc?

c) are you sure you got the windows binary?

Posted: Wed Aug 07, 2002 9:44 am
by zza1pqx
Does anyone know exactly who has decided apache2x and php4x aren't stable. I mean where am I most likley to find release notes to that affect, php.net or apache.org?

I put the relevant command lines in where similar command lines were put as you said.

Both the php.net and apach.org sites are not the best at displaying version types in the world so I spent some time on this.
I downloaded

apache_2.0.39-win32-x86-no_ssl.msi
php-4.2.2-Win32.zip
and
mysql-3.23.51-win.zip

although I am not even close to setting the database up now that I am stuck with this problem.
The annoying thing is I have been in this kind of situation before and its likley to be something stupid I know it is.

Posted: Fri Aug 09, 2002 8:38 pm
by cctrax

Posted: Sat Aug 10, 2002 3:38 am
by zza1pqx
Soon as I have finished nights Ill give it a look.
Cheers Buddy!!!

Posted: Sun Aug 11, 2002 4:03 am
by HellBoy
Seems like you forgot the following...

Code: Select all

AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

let me know if it helps :)