Only Fast-CGI works

Discussion in 'Installation/Configuration' started by NeeChee, Aug 3, 2009.

  1. NeeChee

    NeeChee New Member

    I've been looking for a solution to this. Whenever I set a site's PHP mode to anything other than Fast-CGI (CGI/Mod-PHP/SuPHP) the site returns an 500 error.

    I found out because I tried to override PHP settings with an htaccess (max filesize upload) which wouldn't work for me. (Help with that would be appreciated as well)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Look in the error log of the website, you will find the reason for the error explained there.
     
  3. NeeChee

    NeeChee New Member

    I have looked into the errorlogs before I posted my problem here, the only thing I could find in the apache log was a
    Code:
    [warn] long lost child came home! (pid ...) 
    and
    Code:
    [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
    other than that... nothing.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to lookm into the error log of the website and not the general apache log!
     
  5. NeeChee

    NeeChee New Member

    I checked both, upper warn came from general, lower one from site specific one.

    Edit:
    I now got some additional errors from trying again:
    Code:
    [Wed Aug 05 09:06:49 2009] [alert] [client ***.***.***.***] /****************/.htaccess: php_flag not allowed here
    
    EDIT2:

    I've now narrowed it down to my .htaccess file. The server will return 500 errors if I use php_flag of php_value in my .htaccess file. Below a copy of the .htaccess file causing trouble.

    Code:
    # AddDefaultCharset     UTF-8
    AddType text/x-component .htc
    
    <IfModule mod_php5.c>
    php_flag       display_errors  Off
    php_flag       log_errors      On
    php_value      error_log       logs/errors
    
    php_value      upload_max_filesize     5M
    php_value      post_max_size   6M
    php_value      memory_limit    64M
    
    php_value      zlib.output_compression 0
    php_value      magic_quotes_gpc        0
    php_value      zend.ze1_compatibility_mode     0
    
    php_value      session.auto_start      0
    php_value      session.gc_maxlifetime  21600
    php_value      session.gc_divisor      500
    php_value      session.gc_probability  1
    
    php_value      mbstring.func_overload  0
    </IfModule>
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^favicon.ico$ skins/default/images/favicon.ico
    </IfModule>
    
    Order deny,allow
    
     
    Last edited: Aug 5, 2009
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    php_flag and php_value can only be used for mod_php and have to be moved to the apache directives field of the website then as they are forbidden for .htaccess files.
     
  7. NeeChee

    NeeChee New Member

    Thanks very much, everything seems to work fine now. However I was wondering if I could set the php_flag and php_value for specific folders in my website.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    No, these settings are always website wide.
     
  9. NeeChee

    NeeChee New Member

    Isn't there any way to make directory specific php_flags and values?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Not as far as I know. If you run different software, you should make a new website for every application and do not install them in the same website.
     
  11. NeeChee

    NeeChee New Member

    Okay, then thanks for all your help! I know I've been a pain in the a**! xD
     
  12. BorderAmigos

    BorderAmigos New Member

    I uses php_value in my .htaccess files and it works.
    Code:
    <IfModule mod_php5.c>
      php_value magic_quotes_gpc                0
      php_value register_globals                0
      php_value session.auto_start              0
      php_value mbstring.http_input             pass
      php_value mbstring.http_output            pass
      php_value mbstring.encoding_translation   0
      php_value output_buffering On
      php_value output_handler mb_output_handler
      php_value log_errors 1
    </IfModule>
    

    EDIT: It works with suPHP. It may not with CGI or Fast-CGI.
     
    Last edited: Feb 12, 2010

Share This Page