Web Hosting Talk







View Full Version : Problems with installing PHP with Apache for Windows


Suedish
02-24-2004, 07:08 PM
I get some problems when i try to get PHP working with Apache 1.3 under Windows XP.
I havent done much configuring except for what the docs at php.net tells me to do, which is 3 steps. Which is the following:

Open httpd.conf with your favorite editor and locate the LoadModule directive and add the following line at the end of the list for PHP 4: LoadModule php4_module "c:/php/sapi/php4apache.dll" or the following for PHP 5: LoadModule php5_module "c:/php/sapi/php5apache.dll"

You may find after using the Windows installer for Apache that you need to define the AddModule directive for mod_php4.c. This is especially important if the ClearModuleList directive is defined, which you will find by scrolling down a few lines. You will see a list of AddModule entries, add the following line at the end of the list: AddModule mod_php4.c For PHP 5, instead use AddModule mod_php5.c

Search for a phrase similar to # AddType allows you to tweak mime.types. You will see some AddType entries, add the following line at the end of the list: AddType application/x-httpd-php .php.

------

Thats the only three things ive done, and now when i try to start the Apache server i get the following error message:

Syntax error on line 193 of c:/apache/conf/httpd.conf:
Cannot load c:/php/sapi/php4apache.dll into server: (126) Cannot find the module

Does anyone know why this is happening, and what i can do to try and fix it?
Thanks so much in advance.

digitok
02-24-2004, 11:32 PM
Try this PHP4/Apache installation tutorial by Webmonkey:

http://hotwired.lycos.com/webmonkey/00/44/index4a_page8.html?tw=programming

blackbelt080
02-25-2004, 12:35 AM
I found this one on Google. http://forums.devarticles.com/t3146/s9c5f80e1610ac28507742846a7803c93.html :)

blackbelt080
02-25-2004, 12:37 AM
Well here it is for those who still dont know how on a win2k machine or.. windows.


first because php 4.3.4 doesnt have de apache2.dll i got me a
easyphp1.7 and installed it.

www.easphp.org i think ( google :> )

than after installing it copy and paste the sapi folder from the easyphp /php/ folder and copy it into the c:\php folder.

( it will have the apache2.dll now in youre c:\php )

than add 2 lines @ the but of LoadModule in httpd.conf

LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php


and copy the php4ts.dll into youre /windows/system/ or winnt/system folder

restart apache and youre alll good

Suedish
02-25-2004, 03:08 AM
Thanks alot everyone, I'm gonna try it as soon as i get home from work again. The links looks very promising.
Hopefully I can get started now =)