PHP dont work

Discussion in 'Installation/Configuration' started by xciso, Feb 26, 2008.

  1. xciso

    xciso Member

    Hi.
    My first post at this forum! :p
    I have installed ispconfig at my server with debian 4.0 (the perfect setup guide).
    I have also installed suphp (with the suphp guide).

    My problem is that i cant get php to work.
    I have triend in hours now, but I cant get it work :mad:

    When i make a phpinfo.php file and try it in my browser it just show <? phpinfo(); ?>

    If i try with with any other php files it look like this for example:

    <?php
    /*
    $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

    and so on.


    Please help ;)
     
  2. edge

    edge Active Member Moderator

    Did you enable PHP for that site?
    It's under ISP manager > the-site-you-created > Basis.
    You will see an option "PHP Scripts", that you need to enable
     
  3. raypettersen

    raypettersen New Member

    I`ve also tried to make suphp work with debian etch. It seems quite impossible when following the guides at howtoforge... The closest I came was to get a error 500 (uid error). I even tried to set the minimum uid down to 1 instead of 100 (default), without any results.
     
  4. xciso

    xciso Member

    Ofcuarse I have set php-scripts on for all my sites.
     
    Last edited: Feb 27, 2008
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    SuPHP works fine for me with the guides from howtoforge. If you dont post exactly what you did, we will not be able to help you.

    Please make a new thread for this.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the Vhost definition for the site from the file /etc/apache2/vhosts/Vhost_ispconfig.conf
     
  7. raypettersen

    raypettersen New Member

    Im giving it another shot today. Note that I am not using debian sarge, like in the howto`s, but debian etch. I`ll report later, how it went. This is my third attempt from a clean ISPconfig install.

    About the vhost config, everything looked okay. The suphp insertion worked like it should, but it resulted in a 500 min_uid error.

    One other thing, when I did the guide, I ended up with two suphp.conf files. One in /etc/, and one in /etc/suphp/.. Is that normal? What is the correct conf file?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The howtos are available for debian etch too. please have a look at the ispconfig documentation page and compare your setup with the correct howto for debian etch.
     
  9. raypettersen

    raypettersen New Member

    Did the reinstall and ended up with the same irritating 500 errorpage.

    Here is my vhost file :

    This is the guide i followed in this case :

    http://www.howtoforge.com/install-s...tions-for-use-with-ispconfig-2.2.20-and-above

    Here is my suphp.conf :

     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Have a look in the error log of the website for a detailed error message.
     
  11. raypettersen

    raypettersen New Member

    Everytime i reload the page, the following message is recorded in /var/log/suphp.log

    Where are the log files for the specific site stored?
     
  12. raypettersen

    raypettersen New Member

    Hi again, I identified the error, and now everything is working as it should.

    The clue was located in the vhost file. I admit it was kind of a newbie error by myself, but this is my first attempt with suphp - and the guides did not mention that the ISPconfig site has to have a webx_user for suphp to function properly. I was aware that suphp is "user priveleges" in origin, so I take the blame for this one...

    In the vhost file, apache runs with user : nobody, and group webx if a user has not been created. The solution was to create a user in ISPconfig under the specific site, make him admin, make sure that every file in the web catalogue is owned by the new user - and voila - the pesky 500 error is no more!

    Im quite relieved...
     
  13. raypettersen

    raypettersen New Member

    To be more specific :

    "nobody" is what results in the 500 error, if you haven`t created a webuser inside ISPconfig.

    This should be added in the suphp/ispconfig guides.
     
  14. xciso

    xciso Member

    I dont have any errors at the site.

    I am now reinstalling everything.... :p
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Take a look at the web site's error log. It's located in /var/www/web1/logs, for example.
     
  16. xciso

    xciso Member

    I have now reinstalled the hole debian etch + ispconfig, and i cant not get php working.

    What shell I do?

    What files are you want to see.
    I will give my left hand to get it works ;) Almost :D

    EDIT:

    If i uncomment the 2 strings in /etc/apache2/mods-enabled/php5.conf"
    Its working.
    But if they are uncomment i think i not could change if php should be on in ispconfig for every user. right?

    What could be wrong?
    Help fast!!! :D
     
    Last edited: Mar 1, 2008
  17. falko

    falko Super Moderator Howtoforge Staff

    Right.
    What's the output of
    Code:
    ls -la /etc/apache2/vhosts
    ? Any errors in the web site's error log when you switch on PHP?
     
  18. ralfba

    ralfba New Member

    same to me ... :-(

    hi Fellows ....

    i have also the problem that i could not bring PHP to work on my pages with the regular function to configure the web in ispConfig.
    PHP only works when i put a line into the apache-directives-box saying
    Code:
    AddHandler application/x-httpd-php .php
    any idea what did wrong.
    I am running on opensuse 10.3
    thanks - ralf
     
  19. mike_phi

    mike_phi New Member

    Unable to configure php on a per site basis

    Hi there all, I have the exact same problem, the only time php works is when I uncoment the following lines, and this implies global php to all sites

    AddHandler php5-script .php
    AddType text/html .php

    there is probably something fundamantal we are all missing,

    I have added all the Vhost_config.conf,phpd.conf and httpd.conf files on another post in this forum.

    at

    http://www.howtoforge.com/forums/showthread.php?t=21169

    also just to provide more detail this is the procedures I follwoed when making the site

    - I logged in as admin, then created a client
    - I then created a site associated with this client
    -I then created a user (site administrator)
    - I then used ftp (loged in as this new site administrator)
    and copied my test php file which is a simple helow world caled index.php


    I then launched my site using

    http://localhost/<my new site name>/web/index.php

    and presto it just prints out uninterpreted php code nothing works : (



    Really hoping for an answer or some debugging tips for this issue

    cheers
     
  20. falko

    falko Super Moderator Howtoforge Staff

Share This Page