HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Added new site, PHP not working (http://www.howtoforge.com/forums/showthread.php?t=26334)

spuppy 27th August 2008 04:45

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!

Ben 27th August 2008 08:30

did you enable php support in the new web?

if so, does the apache's access / errorlog for that web show any error?

spuppy 27th August 2008 08:55

Quote:

Originally Posted by Ben (Post 142413)
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.

till 27th August 2008 10:30

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.

spuppy 27th August 2008 10:51

Quote:

Originally Posted by till (Post 142435)
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?

till 27th August 2008 10:56

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?

spuppy 27th August 2008 11:01

Quote:

Originally Posted by till (Post 142453)
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

Hans 27th August 2008 11:07

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

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

spuppy 27th August 2008 11:37

Quote:

Originally Posted by Hans (Post 142457)
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 ;)

Hans 27th August 2008 12:05

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).


All times are GMT +2. The time now is 22:09.

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