Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > PHP HTML parsing problem

PHP HTML parsing problem
Thread Tools
Fresh-Faced Recruit
Join Date: Aug 1999
Location: Seattle, WA, USA
Status: Offline
Reply With Quote
Jun 18, 2003, 01:14 AM
 
I've got PHP up and running on my local webserver, but I'm having a problem. Whenever I surf to a .php web page served by my box, it prompts me to save the file rather than parsing it for HTML and displaying the webpage. What's wrong? I already added

AddType Application/x-httpd-php .php .html

to my httpd.conf. Any help would be appreciated!
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jun 18, 2003, 01:40 AM
 
assuming it installed correctly, just restart apache: sudo apachectl graceful
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
EnderWS  (op)
Fresh-Faced Recruit
Join Date: Aug 1999
Location: Seattle, WA, USA
Status: Offline
Reply With Quote
Jun 19, 2003, 06:45 PM
 
I've restarted it several times and checked the whole .conf file for something that may be wrong. Is it a MIME type problem? Why would Apache be sending the .php file as a file to be saved rather than HTML? Is it sending the wrong headers?
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jun 19, 2003, 08:56 PM
 
Make sure you have the following two lines somewhere ABOVE that line

LoadModule php4_module [where it is]
AddModule mod_php4.c
     
EnderWS  (op)
Fresh-Faced Recruit
Join Date: Aug 1999
Location: Seattle, WA, USA
Status: Offline
Reply With Quote
Jun 19, 2003, 11:56 PM
 
That did the trick! They were present but commented out. Thank you, kind sir!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:43 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2