In this tutorial, we will show you how to manage your app settings.
First Login to your SetupServer.io Account and go to “Applications” section from the header and select the app in which you want to change settings.
After that, go to App Settings Section from Vertical Navigation panel.
Here is the detailed explanation about all the settings that user might want to change in their app configuration.
Change PHP Version of App
This will change the PHP version of the App on which it is already running. If you want to change the PHP version select the PHP version you want to run your installed App.
After that click on click on “Change PHP Version” button bellow the drop-down to change PHP version of your App.
PHP Settings
Some PHP settings that you want to change for your App.
Max Execution Time
This setting will change maximum time allocated for execution of each script.
Normally its default value is set to 30 Seconds.
max_execution_time = 30
Maximum Upload Size
It is used to set the maximum file size for uploading. This means that the file with greater size than mentioned will not be uploaded to the server via mentioned App.
upload_max_filesize = 50M
Memory Limit
It is used to set maximum memory limit a script may consume during its execution. Its default value is set to 128M.
memory_limit = 128M
PHP Max Input Time
It sets the 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. Its default value is set to 60 Seconds.
max_input_time = 60
PHP Max Input Variables
It is used to set the limit of PHP input variables that may be accepted for GET/POST/COOKIE requests. Its default value is set to 1000.
max_input_vars = 1000
PHP Session Max Life
After this number of seconds, stored data will be seen as ‘garbage’ and cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440
PHP Timezone
It defines the default timezone used by the date functions.
date.timezone = etc/UTC
PHP Display Errors
This directive controls whether or not and where PHP will output errors, notices, and warnings too. Error output is very useful during development, but it could be very dangerous in production environments. Depending on the code which is triggering the error, sensitive information could potentially leak out of your application such as database usernames and passwords or worse.
display_errors = Off
PHP Error Reporting
This directive informs PHP of which errors, warnings, and notices you would like it to take action for. The recommended way of setting values for this directive is through the use of the error level constants and bitwise operators.
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
A user can choose 1 of the 3 option provided for error reporting:
- Default – [E_ALL & ~E_DEPRECATED & ~E_STRICT]
- Development Environment – [E_ALL | E_STRICT]
- Production Environment – [E_ALL & ~E_DEPRECATED]
By default, PHP is set to take action on all errors, notices and warnings EXCEPT those related to E_NOTICE and E_STRICT, which together cover best practices and recommended coding standards in PHP.The meaning of setting values are as follows:
E_ALL – All errors and warnings (includes E_STRICT as of PHP 5.4.0)
E_DEPRECATED – warn about code that will not work in future versions of PHP
E_STRICT – run-time notices, enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code
PHP Disable Functions
This setting is used to disable the PHP functions like escapeshellcmd, exec, curl_multi_exec etc. Though this functions may be run directly via Server Terminal.
SHORT_OPEN_TAGS
Tells PHP whether the short form (<? ?>
) of PHP’s open tag should be allowed. If you want to use PHP in combination with XML, you can disable this option in order to use <?xml ?>
inline. Otherwise, you can print it with PHP, for example: <?php echo '<?xml version="1.0"?>'; ?>
. Also, if disabled, you must use the long form of the PHP open tag (<?php ?>
).
Its default value is set to “On”. If you don’t want to this uncheck the checkbox to overwrite its default value to “Off”.
short_open_tag = Off
ALLOW_URL_FOPEN
It is used whether to allow the treatment of URLs (like http:// or ftp://) as files. Its default value is set to “Off”.
If you want to allow this click on the checkbox to overwrite its default value to “On”.
allow_url_fopen = On
FPM Settings
Process Manager
This option will choose how the process manager will control the number of child processes. This is a mandatory field and has possible values ‘static’, ‘ondemand’, ‘dynamic’. Its default value is ‘ondemand’.
pm = ondemand
- static – the number of child processes is fixed (
pm.max_children
). - ondemand – the processes spawn on demand (when requested, as opposed to dynamic, where
pm.start_servers
are started when the service is started. - dynamic – the number of child processes is set dynamically based on the following directives:
pm.max_children
,pm.start_servers
,pm.min_spare_servers
,pm.max_spare_servers
.
pm.max_children
The number of child processes to be created when pm = static
and the maximum number of child processes to be created when pm = dynamic
. This option is mandatory.
pm.max_children = 1
This option sets the limit on the number of simultaneous requests that will be served. This is equivalent to the ApacheMaxClients directive with mpm_prefork
and to the PHP_FCGI_CHILDREN
environment variable in the original PHP FastCGI.
pm.process_idle_timeout
The number of seconds after which an idle process will be killed. It is only used when
pm = ondemand
.
pm.process_idle_timeout = 10s
Its default value is set to ’10s’. Other available units: s(econds)(default), m(inutes), h(ours), or d(ays), for example-
pm.process_idle_timeout = 10m
pm.process_idle_timeout = 10h
pm.process_idle_timeout = 10d
pm.max_requests
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’. It’s default value is set to ‘0’.
pm.max_requests = 0
It is equivalent to PHP_FCGI_MAX_REQUESTS
environment variable in the original PHP FastCGI.