[SOLVED] Installing PHP on Apache

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
maxedison
Forum Newbie
Posts: 5
Joined: Sun Jul 06, 2008 1:19 pm

[SOLVED] Installing PHP on Apache

Post by maxedison »

I am getting the following error when I try starting my Apache server:

"LoadModule takes two arguments, a module name and the name of a shared object file to load it from"

It runs into this error on line 127 of Apache's configuration file, which refers to LoadModule php5_module libexec/libphp5.so "c:/php/php5apache2.dll"

I initially got this error after installing PHP manually to c:\php. After failing to resolve it, I decided to use the PHP installer. In case it matters, I first installed PHP to my Program Files directory, because this was the default directory provided by the installer. After looking in the Apache config file and noticing that it was referring to a module in the c:\php directory (which didn't exist at the time), I moved the PHP installation directory to that one. I'm not sure if that matters...

I've searched both through this forum and on Google for an answer but haven't had any luck.

Thanks for your help!
Last edited by maxedison on Sun Jul 06, 2008 6:13 pm, edited 1 time in total.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Installing PHP on Apache

Post by jaoudestudios »

When I was on windows, I downloaded and used WAMP which came with everything. It was very impressive. It will install apache, php and mysql for you.

I think this is the link...
http://www.wampserver.com/
maxedison
Forum Newbie
Posts: 5
Joined: Sun Jul 06, 2008 1:19 pm

Re: Installing PHP on Apache

Post by maxedison »

Thanks. I was hoping to do things a bit more manually so that I'd have a better sense of what's going on, but at this point getting on with my PHP training is the priority, so I'll take your suggestion.

Thanks again!
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Installing PHP on Apache

Post by califdon »

maxedison wrote: "LoadModule takes two arguments, a module name and the name of a shared object file to load it from"

It runs into this error on line 127 of Apache's configuration file, which refers to LoadModule php5_module libexec/libphp5.so "c:/php/php5apache2.dll"
Although I agree with jaoudestudios that the easy way is to use one of the WAMP packages that hopefully handles all these references when it installs Apache, MySQL and PHP, I observe that the error message is telling you that LoadModule takes 2 arguments, but you have 3: php5_module, libexec/libphp5.so, and "c:/php/php5apache2.dll". In my Windows configuration, my corresponding line is just:

Code: Select all

LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
You might be able to resolve your problem without re-installing, if you just fix that line in config.httpd.
maxedison
Forum Newbie
Posts: 5
Joined: Sun Jul 06, 2008 1:19 pm

Re: Installing PHP on Apache

Post by maxedison »

califdon,

Thanks for your response. That has solved the problem!
Post Reply