## - Configure mod_fcgid ## - ## - see also: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#examples ## - httpd.conf ========= LoadModule fcgid_module modules/mod_fcgid.so # in Abstimmung mit PHP variablen # post_max_size = 128M # (upload_max_filesize = 32) # # 134217728 = 128*1024*1024 =128M # FcgidMaxRequestLen 134217728 # By default, PHP FastCGI processes exit after handling 500 requests, # and they may exit after this module has already connected to the # application and sent the next request. When that occurs, an error # will be logged and 500 Internal Server Error will be returned to # the client. This PHP behavior can be disabled by setting # PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP # application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS # can be set to a much higher value than the default to reduce the # frequency of this problem. FcgidMaxRequestsPerProcess can be set to # a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the # roblem. FcgidMaxRequestsPerProcess 500 vhost config ============ :> ... DocumentRoot "/var/www/adm.warenform.de/htdocs/" FCGIWrapper /var/www/adm.warenform.de/conf/fcgid .php SetHandler fcgid-script AllowOverride All Options +ExecCGI -Indexes Require all granted ... /var/www/adm.warenform.de/conf/fcgid ==================================== #!/bin/sh export PHPRC="/var/www/adm.warenform.de/conf/" export TMPDIR="/var/www/adm.warenform.de/tmp" # PHP child process management (PHP_FCGI_CHILDREN) should # always be disabled with mod_fcgid, which will only route one # request at a time to application processes it has spawned; # thus, any child processes created by PHP will not be used # effectively. (Additionally, the PHP child processes may not # be terminated properly.) By default, and with the environment # variable setting PHP_FCGI_CHILDREN=0, PHP child process # management is disabled. PHP_FCGI_CHILDREN=0 export PHP_FCGI_CHILDREN exec /usr/local/php-5.3.28/bin/php-cgi