Page 1 of 1

[SOLVED] Installing PHP on Apache

Posted: Sun Jul 06, 2008 1:29 pm
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!

Re: Installing PHP on Apache

Posted: Sun Jul 06, 2008 3:47 pm
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/

Re: Installing PHP on Apache

Posted: Sun Jul 06, 2008 3:59 pm
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!

Re: Installing PHP on Apache

Posted: Sun Jul 06, 2008 4:10 pm
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.

Re: Installing PHP on Apache

Posted: Sun Jul 06, 2008 4:37 pm
by maxedison
califdon,

Thanks for your response. That has solved the problem!