Can't get PHP to work with Apache for Win32

This is a discussion on Can't get PHP to work with Apache for Win32 within the PHP Language forums, part of the PHP Programming Forums category; Hi! I have the Abyss webserver installed on my Windows 2000 workstation, and it works OK with PHP (v4.3....


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-19-2004
Lars Gustavsson
 
Posts: n/a
Default 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
Reply With Quote
  #2 (permalink)  
Old 12-19-2004
Daedalus
 
Posts: n/a
Default Re: Can't get PHP to work with Apache for Win32

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



Reply With Quote
  #3 (permalink)  
Old 12-19-2004
Alan Little
 
Posts: n/a
Default Re: Can't get PHP to work with Apache for Win32

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/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:22 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0