Click to See Complete Forum and Search --> : PHP / LoadModule / Apache problem
dopecoder
08-31-2002, 12:12 PM
Hi all,
I have installed Apache 2.0.40 and am trying to add PHP to it. However whenever I add the following line:
LoadModule php4_module c:/php/sapi/php4apache.dll
to the httpd file, Apache refuses to start, all the tutorials online I have found insist on you adding this line ... any ideas why this happens?!
I am running Windows XP Professional if that makes a difference.
Thanks!
dC
dopecoder
08-31-2002, 12:21 PM
Oh and as far as I can tell the paths are correct to the file :) ... cheers
dC :)
Breezer95
08-31-2002, 03:03 PM
I just had this problem last night and was looking for a solution today. I am also using Windows XP with Apache 2.0.40 and PHP4.2.2.
I have tried modifying the line with forward and backward slashes, moving the file to new locations, and trying a trick somebody suggested. The trick was to change the extension of the .dll to .so. None of these helped at all.
The error message in the console when trying to run Apache from there is the following:
Syntax error on line ###(whatever line I had it on at the time) of C:/Program Files/Apache Group/Apache2/conf/httpd.conf:
Cannot load C:/php/sapi/php4apache2.dll into server: The specified procedure could not be found.
I probably did much like dopecoder there and followed every tutorial and explanation possible for this install. Hopefully there is just something missing, some trick, or perhaps it is a bug not yet documented??
Hope somebody can clear us up :)
Breezer95
08-31-2002, 03:08 PM
wow.. I must of just overlooked - problem was addressed below in another thread - my appologies....
download:
http://snaps.php.net/win32/php4-win32-latest.zip
use that and works fine :)
I've had the same problem. Unfortunately, even when I tried the newer PHP, it still didn't work. I am getting irritated at this...
I'm running:
Windows XP
Apache 2.0.40
The version of PHP that's in that zip file up there.
I've checked, rechecked and checked again to make sure the paths are correct. I moved the php4apache2.dll into the Apache modules directory. Still I get this error:
Syntax error on line 173 of <path to file>/httpd.conf:
Cannot load <path to file>/modules/php4apache2.dll into server: The specified procedure could not be found.
Can someone help me out?
Breezer95
08-31-2002, 08:16 PM
All I did to fix this.....
Get that latest snapshot above - override all of your current PHP files with those. Copy all DLL's to their appropriate places and overwrite any it says. Be sure to point to the correct locations of where the files are now and use the same LoadModule line that you have been. Just have to be sure you replace your original DLL files with these new ones in all directories - and then reboot - start her up and she should run.
dopecoder
09-01-2002, 02:02 AM
Well its fixed! ... thanks for all the help ... all I needed to do was two things.
1. download the php4-win32-latest.zip file as specified above and replaced the php4apache2.dll file in my C:/PHP directory with the one from this zip file. I only replaced this file no others.
2. I went and found my httpd.conf file, and in the same directory there is another file named httpd.default, I renamed my existing httpd.conf file to something else (httpd.old) and then renamed httpd.default to httpd.conf.
3. Add the following to the bottom of this file in any text editor.
LoadModule php4_module C:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
and that was it ... working!!
Hope that it works for you!
Cheers
dC
Okay... Apache works now... and PHP is loaded. Now my problem is that it can't seem to find the php_gd.dll extension. I checked and rechecked the path for it and it's correct - yet it won't load. Any ideas?
EDIT: Fixed it... turns out that the php.ini file that comes with PHP has extensions misspelled in the path... :P
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.