Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

.php files showing up as source ?

 
webmaster forum
Anchor  Offline
Activity
0%
 
New Coder
Posts: 20
Topics: 16
January 13, 2009, 05:11:47 AM

Hey guys. I am trying to make a form for my robotics team that sends an email to me saying stuff about how many of our fundraiser items they want and how I can get ahold of them. Problem is that all my .php files are just showing up as source. I have apache installed and I just installed php 5 or so. I don't know what is wrong, but i'm trying to run it locally if that means anything. I will keep messing around with it but any help you guys can give would be a huge help. Thanks.
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
January 13, 2009, 06:17:44 AM

Right, so by the sounds of it you are running it off your own machine?

Firstly, do your php files start with <?php and end with ?> - if not this is probably the issue.

Secondly, have you configured apache correctly to deal with php? You need to do a few other things apart from just installing the components... specifically, whats your httpd.conf looking like? - you need to modify this to instruct apache to load the PHP module. For PHP 5 you will need to add something like
Code:
# Use for PHP 5.x:
LoadModule php5_module        modules/libphp5.so
AddHandler php5-script php

# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php

AddType text/html       php

Have a look at the PHP/Apache documentation or FAQ and it should detail in there exactly what you need

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page January 21, 2012, 11:58:21 PM