The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Re: displaying php code
Author: csinclair 
Date:   05-09-06 19:06

If I understand the question correctly..
If the source is displayed instead of the page then the default .php is not set correctly in the httpd.conf file for the web server. Peruse the httpd.conf file for the line that reads..: DirectoryIndex index.html, change it to read ..:

DirectoryIndex index.php index.html .

Also make sure that the above mentioned directives are stated as well..

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

If all that is done and the apache server is restarted (ie. 'apachectl restart') it should work..
If that's not your question I'll read the next post and see if I can help.

Hope that helps..

Use the source Luke...

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 displaying php code   new
Dan Langille 29-07-02 03:25 
 Re: displaying php code   new
.daniel.schrock 29-07-02 17:30 
 Re: displaying php code   new
John Prather 26-03-03 19:32 
 Re: displaying php code   new
Jeff 28-09-03 15:01 
 Re: displaying php code   new
Matthew Deville 04-11-04 13:13 
 Re: displaying php code   new
csinclair 05-09-06 19:06 
 Re: displaying php code   new
Dan 05-09-06 19:16 
 Re: displaying php code   new
csinclair 21-11-06 16:21 

 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum