
10th April 2006, 21:49
|
|
Junior Member
|
|
Join Date: Apr 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

11th April 2006, 11:41
|
|
Junior Member
|
|
Join Date: Apr 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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>
Last edited by 22hosting; 11th April 2006 at 11:59.
|

11th April 2006, 15:08
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
|
|
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.
|

18th May 2006, 04:24
|
|
Senior Member
|
|
Join Date: Apr 2006
Posts: 169
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
In response to this, can you enable it globally even though you disabled that when you installed ISPconfig?
|

18th May 2006, 09:40
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,807
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
|
|
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.
|

19th May 2006, 01:47
|
|
Senior Member
|
|
Join Date: Apr 2006
Posts: 169
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 15:35.
|
Recent comments
1 hour 58 min ago
7 hours 46 min ago
9 hours 38 min ago
11 hours 23 min ago
15 hours 13 min ago
20 hours 58 min ago
21 hours 9 min ago
1 day 1 hour ago
1 day 7 hours ago
1 day 12 hours ago