ONLY cgi OR fast-cgi works not mod-php or suPHP

Discussion in 'Installation/Configuration' started by MrCompTech, Jul 11, 2010.

  1. MrCompTech

    MrCompTech New Member

    I used the Perfect Server F13 - ISPConfig3 to setup this server.

    I use phpinfo.php to test the operation of php and the only time it works is when the web site is set to use cgi or fast-cgi and does not work when the web site is set to mod-php or suphp.

    When set to mod-php the page returned is entirely blank even if i use view page source there is not any text not even a single html tag.

    When I use suPHP I get the error :
    ===================================
    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    ==================================

    Any ideas anyone?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Post the exact error messages from the error.log of the website.
    2) Post the content of the suphp.conf file.
     
  3. MrCompTech

    MrCompTech New Member

    More Details

    When I try to view phpinfo.php while the website is set to "suPHP":

    In the log file I get:

    [Mon Jul 12 11:19:12 2010] [error] [client 192.168.1.102] SecurityException in Application.php:511: Unknown Interpreter: php
    [Mon Jul 12 11:19:12 2010] [error] [client 192.168.1.102] Premature end of script headers: phpinfo.php
    [Mon Jul 12 11:19:12 2010] [error] [client 192.168.1.102] File does not exist: /var/www/error/500.html

    Removing the check mark from "Own Error-Documents" gets rid of the last error.

    And here are my suphp.conf files:
    I have two suphp.conf files one in /etc and one in /etc/httpd/conf.d/

    /etc/httpd/conf.d/suphp/conf
    LoadModule suphp_module modules/mod_suphp.so

    /etc/suphp.conf
    [global]
    ;Path to logfile
    logfile=/var/log/httpd/suphp.log

    ;Loglevel
    loglevel=info

    ;User Apache is running as
    webserver_user=apache

    ;Path all scripts have to be in
    docroot=/var/www

    ;Path to chroot() to before executing script
    ;chroot=/mychroot

    ; Security options
    allow_file_group_writeable=true
    allow_file_others_writeable=false
    allow_directory_group_writeable=true
    allow_directory_others_writeable=false

    ;Check wheter script is within DOCUMENT_ROOT
    docroot=/var/www

    ;Send minor error messages to browser
    errors_to_browser=false

    ;PATH environment variable
    env_path=/bin:/usr/bin

    ;Umask to set, specify in octal notation
    umask=0022

    ; Minimum UID
    min_uid=100

    ; Minimum GID
    min_gid=100

    [handlers]
    ;Handler for php-scripts
    x-httpd-suphp=php:/usr/bin/php-cgi

    ;Handler for CGI-scripts
    x-suphp-cgi=execute:!self
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Change the line:

    x-httpd-suphp=php:/usr/bin/php-cgi

    to:

    x-httpd-suphp="php:/usr/bin/php-cgi"

    in the suphp.conf file.
     
  5. MrCompTech

    MrCompTech New Member

    Excellent Till!

    Now it's working!

    You are totally awesome!

    Do you twitter or have a blog?

    I definitely want to be following you!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    There is a twitter feed for ISPConfig that I manage, but its low traffic a I use it only for release annoncements:

    http://twitter.com/ispconfig

    Beside that, I run the ISPConfig FAQ on my blog:

    http://www.faqforge.com/
     

Share This Page