The FreeBSD Diary

The FreeBSD Diary (TM) Remember
I remember
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Processing PHP files
Author: Dan 
Date:   07-02-08 19:38

If you see php code when viewing a .php file, you have not told Apache to process those files through PHP. I added these entries to httpd.conf:

#
# And for PHP 5.x, use:
#
<IfModule mod_php5.c>
AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps
</IfModule>

I also do this:

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
<IfModule mod_php5.c>
DirectoryIndex index.php index.php3 index.html
</IfModule>
</IfModule>

--
Webmaster

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

 Topics Author  Date
 Processing PHP files   new
Dan 07-02-08 19:38 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 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

phorum.org