Problems configuring PHP5 on Apache2

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
andyatstanwell
Forum Newbie
Posts: 3
Joined: Mon Sep 27, 2010 8:38 am

Problems configuring PHP5 on Apache2

Post by andyatstanwell »

Hi. I've installed Apache 2.2 and PHp 5.2.14. I've edited httpd.conf and added the two lines :

LoadModule php_module "c:/php/php5apache2.dll"
Addtype appication/x-httpd-php .php

When I start Apache I get the following error in a DOS command line box :

httpd.exe :Syntax error on line 109 c:/program files(x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load c:/php/php5apache2.dll into server. The specified module could not be found.

However the file c:/php/phpapache2.dll DOES EXIST.
Any ideas anyone ??
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Problems configuring PHP5 on Apache2

Post by mikosiko »

in Windows this works for me (notice the \ usage instead of /)
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:\PHP\"

# LOAD THE SAPI SO THAT APACHE CAN USE PHP
LoadModule php5_module "C:\PHP\php5apache2_2.dll"

# HOOK THE PHP FILE Extensions
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
Post Reply