logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: trouble getting apache to call php for .html and .php pages
Author
JimC



Joined: 02 Jan 2007
Posts: 1
Location: Palm Springs

PostPosted: Tue 02 Jan '07 23:06    Post subject: Reply with quote

I am having trouble getting apache to call php for .html and .php pages. Whenever I try to open a .php page Opera displays the .php file as text. IE attempts to save the file to disk. I believe I have followed the instructions posted on this thread.

I have installed php 5.2.0 and apache 2.2. The apache service runs with no errors. The following changes to php.ini and httpd.conf have been made:

PHP.ini

doc_root = "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"

extension_dir = "c:\php5\ext"

httpd.conf

LoadModule php5_module "c:/php5/php5apache2_2.dll"

AddHandler application/x-httpd-php .php

PHPIniDir "C:/php5"

I added c:\php5 to the path variable and rebooted.

If anyone could see what I am missing, it would be greatly appreciated.

Thanks
Back to top
Panda



Joined: 16 Dec 2006
Posts: 16

PostPosted: Wed 03 Jan '07 0:38    Post subject: Reply with quote

I had exact the same problem before when my apache crashed and never start again, i reinstalled it, but then i was told that i need to completely uninstall apache before reinstalling it, and i did uninstalled apache like i was told, after that reinstalled and it solved the case .
Back to top
pips



Joined: 03 May 2006
Posts: 65
Location: Manchester, UK

PostPosted: Wed 03 Jan '07 12:49    Post subject: Reply with quote

remove the following line from your httpd.conf file.

PHPIniDir "C:/php5"

This doesn't make sense why it works, but I found this to be the solution on my own installation!

Cheers,
Phil
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 03 Jan '07 13:03    Post subject: Reply with quote

pips wrote:
remove the following line from your httpd.conf file.

PHPIniDir "C:/php5"

This doesn't make sense why it works, but I found this to be the solution on my own installation!

Cheers,
Phil


PHPIniDir is for the location of the php.ini if not set in httpd.conf php takes the one from C:\Windows / C:\Winnt if there is none php takes default values for settings.
Back to top


Reply to topic   Topic: trouble getting apache to call php for .html and .php pages View previous topic :: View next topic
Post new topic   Forum Index -> Other Software