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....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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/ |