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