472,096 Members | 1,433 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

Can't get PHP to work with Apache for Win32

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
2 2185
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
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.

Similar topics

reply views Thread by lewi | last post: by
5 posts views Thread by DrWizard | last post: by
1 post views Thread by Rolfe | last post: by
7 posts views Thread by Steevo | last post: by
3 posts views Thread by SMH | last post: by
11 posts views Thread by cybervigilante | last post: by
2 posts views Thread by AlterEgo | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.