Newbie - problem getting php to run with 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
rpthomas
Forum Newbie
Posts: 1
Joined: Wed Jul 26, 2006 6:30 am

Newbie - problem getting php to run with Apache

Post by rpthomas »

Hi

I have followed the instructions to get php running with apache on Windows XP home. Using apache apache_2.2.2-win32-x86-no_ssl and php-4.4.2-Win32(2)

I have, as instructed, placed php.ini in the php4 folder, checkd the paths, and have added the following code to the bottom of the apache config file:

LoadModule php4_module "c:/php4/php4apache2.dll"
AddType application/x-httpd-php .php .php3 .phps

# configure the path to php.ini
PHPIniDir "c:/php4"

I have created a file phpinfo.php and placed it in the htdocs folder.

When I open my browser and type localhost/phpinfo.php I get

<?php echo phpinfo() ?>

When I 'uncomment' the LoadModule and AddType and PHPIniDir, Apache won't start.
When I comment them up, Apache works ok, but clearly doesnt' read the php.

I have spent hours trying to find out what's wrong, but cant get any further.

Anyone got any suggestsion, please?

My direct email is lrndqg@btinternet.com

Richard
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Moved to - Apache, IIS, Web Servers
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

uninstall apache 2.2, install apache 2.0
Post Reply