By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Can't get PHP to work with Apache for Win32

P: n/a
Hi!
I have the Abyss webserver installed on my Windows 2000 workstation,
and it works OK with PHP (v4.3.7). Since I also have a Linux server at
an other location, I wanted to have similiar web server setup at home,
so I tried to install Apache webserver for Win32 (v1.3.33), but can't
get it to work with PHP. My PHP.INI has the,

; Enable the PHP scripting language engine under Apache.
engine = On

There's nothing about PHP inside the httpd.conf file. Have I missed
something here?

I would appreciate any comments on this.

TIA
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You need to load the php module in httpd.conf by adding these 3 lines
(change C:/PHP4_InstallationDir/ to reflect your installation):

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

Dae
Hi!
I have the Abyss webserver installed on my Windows 2000 workstation,
and it works OK with PHP (v4.3.7). Since I also have a Linux server at
an other location, I wanted to have similiar web server setup at home,
so I tried to install Apache webserver for Win32 (v1.3.33), but can't
get it to work with PHP. My PHP.INI has the,

; Enable the PHP scripting language engine under Apache.
engine = On

There's nothing about PHP inside the httpd.conf file. Have I missed
something here?

I would appreciate any comments on this.

TIA

Jul 17 '05 #2

P: n/a
Carved in mystic runes upon the very living rock, the last words of
Daedalus of comp.lang.php make plain:
I tried to install Apache webserver for Win32 (v1.3.33), but can't
get it to work with PHP. My PHP.INI has the,

; Enable the PHP scripting language engine under Apache.
engine = On

There's nothing about PHP inside the httpd.conf file. Have I missed
something here?

You need to load the php module in httpd.conf by adding these 3 lines
(change C:/PHP4_InstallationDir/ to reflect your installation):

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


Cool, I didn't know you could run PHP as an Apache module under Windohs.

If you want or need to run it as a CGI instead, include this in your conf
file:

AddType application/x-httpd-php php
Action application/x-httpd-php /bin/php4/php.exe

(With the appropriate path to your binary, of course)

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.