Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Apache Config Problem

Status
Not open for further replies.

smmurph

IS-IT--Management
Jul 8, 2005
10
US
I had to rebuild due to a driver problem that crashed my machine (windows XP Pro) so i loaded PHP and Apache the same way I always do, changed the PHP.ini file and Httpd.conf files the way I always do, and now when I access my htdocs folder I get my list of included files same as always, however when I try to open one of them in a web page I get a download/save dialog. This is really irritating ... it won't allow me to view a page in a web browser ... just asks me if I want to open or save. If I open it brings the page up in my editor (dreamweaver 8) and if I hit save, it opens a Save As windows dialog.

Anybody have any ideas? I have the newest versions of PHP 5 and Apache 2.2.

Thanks,
Smmurph
 
It looks like its not configured to parse PHP files. you say you edited your httpd.conf like you always do? can we see what you edited, particularly the section where you tel it to parse php files.

AddHandler
Addtype
ScriptAlias etc...



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks Vacunita,

I only make 4 changes to the httpd.conf file. The only change where you asked is the add of the folowing:

AddType application/x-httpd-php .php

Then I chage the document and document root paths to point localhost to C:/htdocs, and one more addition:

LoadModule php5_module C:/PHP/php5apache2_2.dll

This is all I change for the Apache configuration.

Thanks,
smmurph
 
have you (i) rebooted after making the changes (or at least restarted apache)? (ii) ensured that IIS is turned off?
 
Jpadie,

Yes, have restarted several times and never loaded IIS.

Thanks,
Smmurph
 
Well, as vacunita pointed out, the errors you are getting relate to php not processing the files. ie. it's not turned on (properly).

i think there is a command line switch that you can use to force apache to check the httpd.conf file and tell you about errors. the Apache documentation/forum will be able to help.

otherwise you could check the permissions on your setup. make sure that the apache process has access to the php directory and the directories in which your web root resides (and it's children).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top