Problems installing PHP with Apache on Windows

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
larios22
Forum Newbie
Posts: 3
Joined: Thu Oct 03, 2002 11:34 am

Problems installing PHP with Apache on Windows

Post by larios22 »

After installing Apache 1.3 on Windows 2000 I tried to install PHP manually, but when a open a php script the browser jumps over the php tags. What else do I have to do?

I need help, I have to install it in my company.

Thanks.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

By 'the browser jumps over the php tags' what exactly do you mean? We can't help you if you don't give us a good description of the problem.

Mac
larios22
Forum Newbie
Posts: 3
Joined: Thu Oct 03, 2002 11:34 am

More info

Post by larios22 »

I think I have followed the install.txt instructions but it still doesn't work. I have added these lines to Apache's httpd.conf file:

LoadModule php4_module "c:/Program Files/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

When Apache starts, it sows a warning: [warn] module mod_php4.c is already added, skipping

And the browser ignores anything between <?php ... ?>
thedunn
Forum Newbie
Posts: 8
Joined: Sat Sep 21, 2002 9:29 am
Location: DUNNland

Post by thedunn »

Hi.
I have Apache 1.3/PHP/MySql running fine on Windows XP. Perhaps it's a code problem? The first thing I'd do is remove AddModule mod_php4.c because it just clogs up your error log. Is Apache showing everything? Is it configured correctly? Because it sounds like PHP is configured correctly but it's Apache that isn't.
HTH
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

"When Apache starts, it sows a warning: [warn] module mod_php4.c is already added, skipping "

Look in the conf file again. You are going to have a long set of LoadModule commands, and a AddModule.

Put the LoadModule php4_module "c:/Program Files/php/sapi/php4apache.dll in with the rest of the LoadModule statements, and then put the AddModule mod_php4.c and AddType application/x-httpd-php .php with the rest of the Addmodule commands...

This will take care of the error.

Secondly, did you copy all the dll's that the Install.txt tells you to copy them to??
larios22
Forum Newbie
Posts: 3
Joined: Thu Oct 03, 2002 11:34 am

Thank you all

Post by larios22 »

It works!!!

I think it was that the AddModule and AddType commands were with the set of LoadModule commands. Now it works perfectly.

Thank you very much Infolock.

Perhaps, I could have lost my job :( (I am a web administrator. Had you ever seen an admin not capable of installing PHP? )

Thank you again.
Post Reply