Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th August 2008, 04:45
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Exclamation Added new site, PHP not working

Hi, I added a new site, and migrated the data over. However, when I try to open the site in a browser, a download dialog opens up, asking to download a php file. Help please!
Reply With Quote
Sponsored Links
  #2  
Old 27th August 2008, 08:30
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

did you enable php support in the new web?

if so, does the apache's access / errorlog for that web show any error?
Reply With Quote
  #3  
Old 27th August 2008, 08:55
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Ben View Post
did you enable php support in the new web?

if so, does the apache's access / errorlog for that web show any error?
Yes, of course it's enabled. I added more sites and in fact none of them work.

My error log consists of this line

[Tue Aug 26 22:58:24 2008] [error] an unknown filter was not added: PHP

About every 10 seconds or so.

Last edited by spuppy; 27th August 2008 at 09:12.
Reply With Quote
  #4  
Old 27th August 2008, 10:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,509
Thanks: 815
Thanked 5,269 Times in 4,130 Posts
Default

Quote:
[Tue Aug 26 22:58:24 2008] [error] an unknown filter was not added: PHP
Thats nothing to worry about.

Did you install and enable mod_php as described in the perfect setup guide.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 27th August 2008, 10:51
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Thats nothing to worry about.

Did you install and enable mod_php as described in the perfect setup guide.
I followed the directions for CentOS 5.2 exactly. There was no mention at all of anything called mod_php.

However, I installed Apache2 with PHP, and disabled PHP globally as it described. I also installed mod_ruby as the manual describes.. Is this what you are referring to?
Reply With Quote
  #6  
Old 27th August 2008, 10:56
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,509
Thanks: 815
Thanked 5,269 Times in 4,130 Posts
Default

Ok, then mod_php is installed. What happens exactly whe you access a php page?

PLease put the follwing page in one of your websites and name it e.g. info,php:

<?
phpinfo();
?>

then call it in a browser. Which output do you get?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 27th August 2008, 11:01
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Ok, then mod_php is installed. What happens exactly whe you access a php page?

PLease put the follwing page in one of your websites and name it e.g. info,php:

<?
phpinfo();
?>

then call it in a browser. Which output do you get?
I get a download dialog to download a file called info.php
Reply With Quote
  #8  
Old 27th August 2008, 11:07
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Maybe phpmod is installed but not enabled.
If so, do the following:

a2enmod php5
/etc/init.d/apache2 force-reload
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
  #9  
Old 27th August 2008, 11:37
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Hans View Post
Maybe phpmod is installed but not enabled.
If so, do the following:

a2enmod php5
/etc/init.d/apache2 force-reload
apache2? Don't you mean httpd?

And what is that first line?

I am more confused than ever
Reply With Quote
  #10  
Old 27th August 2008, 12:05
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
 
Default Explanation

An ISPConfig version 2 server makes use of two different Apache servers.
Apache 1.3.x for ISPConfig, which servers on port 81 and Apache2.x which servers on port 80 and 443.

Your websites are served by Apache2, so you can enable php5mod for Apache2 with the command: a2enmod php5
To force that the change will take affect reload Apache2 afterwards with the command: /etc/init.d/apache2 force-reload

If i'm not mistaken these commands work also on Centos/Fedora/Suse. (I use Debian).
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 27th August 2008 at 12:26.
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
Apache stopped mccharlet General 6 15th August 2007 15:27
ubuntu ispconfig joomla .htaccess steve1084 General 8 6th January 2007 15:55
PHP Sessions not working on one site! badben General 5 24th August 2006 17:47
php script injections Grizzly General 21 18th July 2006 08:55
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 13th March 2006 23:58


All times are GMT +2. The time now is 07:00.


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