#1  
Old 10th April 2006, 21:49
grantdutoit grantdutoit is offline
Junior Member
 
Join Date: Apr 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP not working on FC4

I installed FC4 as a server to install ISPconfig on. So far ISPconfig is OK, but the php on the server itself does not work. it keeps showing the code. How do I fix PHP? I believe it is PHP5, may be wrong.
Reply With Quote
Sponsored Links
  #2  
Old 11th April 2006, 11:41
22hosting 22hosting is offline
Junior Member
 
Join Date: Apr 2006
Posts: 26
Thanks: 0
Thanked 1 Time in 1 Post
Default

You haven't added the correct extension to Apache possibly? Hence it doesn't recognise it as a php format and parse it correctly, and instead outputs the code straight to screen.

Update : MIME type needs to be handled and the directory needs to know that it can use index.php files.
Look for the following sections :

<IfDefine HAVE_PHP>
LoadModule php_module modules/mod_php.so
</IfDefine>
<IfDefine HAVE_PHP3>
LoadModule php3_module modules/libphp3.so
</IfDefine>
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so




<IfDefine HAVE_PHP>
AddModule mod_php.c
</IfDefine>
<IfDefine HAVE_PHP3>
AddModule mod_php3.c
</IfDefine>
<IfDefine HAVE_PHP4>
AddModule mod_php4.c


<IfModule mod_dir.c>
DirectoryIndex at_domains_index.html index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi index.cfm
</IfModule>


You also must make sure you have the following :


<IfModule mod_php4.c>
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
</IfModule>
<IfModule mod_php.c>
AddType application/x-httpd-php .phtml
</IfModule>




And you will also require something like this in your vhosts section :
<Directory "/home/httpd/vhosts">
AllowOverride All
Options SymLinksIfOwnerMatch
Order allow,deny
Allow from all
php_admin_flag engine off
</Directory>
________
BONG

Last edited by 22hosting; 22nd August 2011 at 14:07.
Reply With Quote
  #3  
Old 11th April 2006, 15:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Did you create a web site in ISPConfig? Did you enable PHP for that web site?

In which directory did you place your PHP script?
If you put it in /var/www/html, it cannot work because PHP is disabled globally and enabled by ISPconfig on a per-site basis.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 18th May 2006, 04:24
tristanlee85 tristanlee85 is offline
Senior Member
 
Join Date: Apr 2006
Posts: 199
Thanks: 3
Thanked 2 Times in 2 Posts
Default

In response to this, can you enable it globally even though you disabled that when you installed ISPconfig?
Reply With Quote
  #5  
Old 18th May 2006, 09:40
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,757
Thanks: 840
Thanked 5,603 Times in 4,414 Posts
Default

Quote:
Originally Posted by tristanlee85
In response to this, can you enable it globally even though you disabled that when you installed ISPconfig?
In ISPConfig 2.2.2 yes, in later versions probably not.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 19th May 2006, 01:47
tristanlee85 tristanlee85 is offline
Senior Member
 
Join Date: Apr 2006
Posts: 199
Thanks: 3
Thanked 2 Times in 2 Posts
 
Default

This probably goes right along with one of my other questions you answered. Since it's set to enable PHP individually, even if I check the box, it isn't set. But, I'll worry about that once I get my webpages to show up in their correct home directory.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting 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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"unknown filter" growing apache log. wwparrish Installation/Configuration 6 1st September 2006 19:40
PHP not working jefash General 10 28th May 2006 09:48
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 14th March 2006 00:58
all my site go to /var/www/ Absolusteph Installation/Configuration 14 11th March 2006 22:27
vhosts not working correctly heyp Installation/Configuration 5 30th November 2005 19:01


All times are GMT +2. The time now is 02:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.