Added new site, PHP not working

Discussion in 'Installation/Configuration' started by spuppy, Aug 27, 2008.

  1. spuppy

    spuppy New Member

    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!
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    did you enable php support in the new web?

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

    spuppy New Member

    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: Aug 27, 2008
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats nothing to worry about.

    Did you install and enable mod_php as described in the perfect setup guide.
  5. spuppy

    spuppy New Member

    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?
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    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:


    then call it in a browser. Which output do you get?
  7. spuppy

    spuppy New Member

    I get a download dialog to download a file called info.php
  8. Hans

    Hans Moderator ISPConfig Developer

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

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

    spuppy New Member

    apache2? Don't you mean httpd?

    And what is that first line?

    I am more confused than ever ;)
  10. Hans

    Hans Moderator ISPConfig Developer


    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).
    Last edited: Aug 27, 2008
  11. spuppy

    spuppy New Member

    Hi, I followed the instructions for CentOS 5.2, and Apache2 never got installed as far as I can tell. There is no /etc/init.d/apache2 (but there is /etc/init.d/httpd). Also, I don't recall ever seeing a part of that manual that installs apache2.

    Here is the line given in page 6 of the manual

    yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
    So of course when I try to do that command you gave, I get the error

    -bash: a2enmod: command not found
    So as you can see, I am totally confused why you guys are referring to apache2, when there is no such thing installed when following the perfect installation manuals...

    If apache2 needs to be installed, what is the best way to do so? And should you also update the manual to reflect this?
  12. Hans

    Hans Moderator ISPConfig Developer

    Page 6 of the manual is about Apache2!

    The command must be: /etc/init.d/httpd reload not /etc/init.d/apache2 reload. I thought it was the same for Centos.
  13. spuppy

    spuppy New Member

    If page 6 is about Apache2, then wouldn't I have Apache2 running on my system? But it's not there!

    /etc/init.d/httpd reload doesn't work.. well it works, but it doesn't change anything. The line a2enmod php5 is the one you gave me that gives the error.
  14. Hans

    Hans Moderator ISPConfig Developer

    I guess the commands on Centos are too different for me. :(
    So i can't help you further at this point. Sorry.
    Maybe it is a good idea too verify if you made all the steps as described within the guide.
  15. spuppy

    spuppy New Member

    I followed all the steps! There is no way that I missed any of them. I think the CentOS 5.2 guide must have a mistake in it or something.. Would you want to look into that so other CentOS users can get ISPConfig to work?
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    This is no general issue with ISPConfig and centos or the guide, so other users are very likely not affected by your problem. I lready installed it several times with this guide on centos without any problem.

    Are there copies of the file Vhost_ispconfig.conf with a date appended in same directory? You can find the directory on your system by running:

    locate Vhost_ispconfig.conf
  17. spuppy

    spuppy New Member

    locate could not find that file at all.

    Do you think you could explain the part of the manual where Apache2 is installed? I'd like to see if I can run those steps again and make sure it is installed. I can't for the life of me find any instance in the manual where it mentions apache2 specifically, and as far as I can see, only apache 1 is ever isntalled after following those directions.

    Thanks for your help
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Last edited: Aug 27, 2008
  19. spuppy

    spuppy New Member

    Apache IS installed on my server, I know that much. I can install websites, and get basic hosting. It's just PHP that is not working, and apparently apache2 is not installed.

    What part on that page related to Apache2 in particular? I still don't see it mentioned once on that page.
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats fine and the current version of apache is 2.x named apache2 ;) so apache = apache2.

Share This Page