webCOMAND

PHP Configuration

Extensions

The following PHP extensions are required for the corresponding functions.

  • ImageMagick - Required for advanced image processing features.  GD is sufficient for basic image processing.
  • PECL Zip Extension - Required to decompress webCOMAND backups during the restore process.

/etc/php.ini

The following configuration options are recommended for PHP.

; default is typically 30
; increase number of seconds to accommodate slower AJAX requests, etc.
max_execution_time = 480

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 480

; Maximum amount of memory a script may consume
; http://php.net/memory-limit
; increase memory limit to improve performance by allowing larger
; repository caches, etc.  Increasing up to 1G or even 4G will help
; with larger installations and publishes.
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
;
; This should be at least as large as max_allowed_packet in /etc/my.cnf
; so that files that reach the maximum allowed size in the database can
; be uploaded via the web.  If some content types have multiple file fields
; you may need to multiply max_allowed_packet by the number of file fields.
post_max_size = 256M
; to handle large uploads in the Repository and Files Apps, increase to:
; post_max_size = 2G

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
;
; This should be at least as large as max_allowed_packet in /etc/my.cnf
; so that files that reach the maximum allowed size in the database can
; be uploaded via the web.
upload_max_filesize = 256M
; to handle large uploads in the Repository and Files Apps, increase to:
; upload_max_filesize = 2G

; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
default_socket_timeout = 480

; Improve cookie security
session.use_strict_mode = On
session.cookie_secure = On
session.name = __Secure-PHPSESSID
session.cookie_httponly = On
session.cookie_samesite = Strict

/etc/php-fpm.d/www.conf

The following configuration options are recommended for PHP FPM.  These adjustments help reduce the number of spare php-fpm processes, especially on less active servers, and more importantly the amount of memory each process will typically consume.

; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
; pm.max_spare_servers = 35
pm.max_spare_servers = 10

; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
pm.max_requests = 500