CENTOS 7 and ISPConfig3 PHP Settings
In CENTOS 7 for wordpress or other php built sites there are several settings that have to be edited in order to allow for larger file transfers and completion of email functions that are using phpmailer.
There are two functions that are used:
PHP
FASTCGI
Additionally, CENTOS 7 in our environment is set to create virtual hosts for websites so we can place multiple websites on a single server. This changes the location of FASTCGI settings to be in a location specific to the virtual host
The following are the edits that have worked for our CENTOS 7 Environment:
PHP
Location /etc/php.ini file
There are several settings changes that need to be made:
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 600
; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
default_socket_timeout = 600
; Maximum time (in seconds) for connect timeout. -1 means no limit
; http://php.net/mysql.connect-timeout
mysql.connect_timeout = 600
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 256M
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 128M
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 128M
FASTCGI
Location /etc/httpd/conf/sites-available/FQDN NAME OF WEBSITE.conf (ex – myhmitest.hammersmithmanagement.com.vhost)
Below is the full and only setting change to be included in the .vhost file:
# php as fast-cgi enabled
# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
<IfModule mod_fcgid.c>
IdleTimeout 300
ProcessLifeTime 3600
# MaxProcessCount 1000
DefaultMinClassProcessCount 0
DefaultMaxClassProcessCount 10
IPCConnectTimeout 3
IPCCommTimeout 600
MaxRequestInMem 26500000
MaxRequestLen 26500000
BusyTimeout 3600
</IfModule>