With the Kyzoe Hosting hosting control panel you can adjust specific PHP settings for each website via the php.ini editor. This is useful for optimising your website’s performance, security or functionality.
Changing PHP settings for a single website
Follow the steps below:
- Go to the dashboard of the website for which you want to change the PHP settings.
- At the top right, click the Advanced drop-down menu.
- Choose Developer Tools and scroll to php.ini editor.
- Under Directive, enter the name of the PHP setting you want.
- Under Value type, select the type you want and enter the value in the text field.
- Click Create to save the change.
The change is applied to this specific website and does not affect other sites within your hosting package.
What are PHP directives?
PHP directives are configuration settings that determine how PHP behaves. By adjusting these settings you can, among other things:
- improve your website’s performance
- limit memory usage
- allow or restrict uploads
- increase security
Below you will find an overview of commonly used PHP directives in web hosting.
Commonly used PHP settings
- memory_limit
Determines the maximum amount of memory a PHP script may use. This prevents badly written scripts from eating up all the server resources. - upload_max_filesize
Sets the maximum size of files that may be uploaded. - post_max_size
Determines the maximum size of POST data. This value must be equal to or greater than upload_max_filesize to allow large uploads. - max_execution_time
The maximum number of seconds a script may run before it is terminated. This prevents scripts from blocking the server for long periods. - max_input_time
The maximum time PHP may spend processing input (POST, GET and file uploads). - display_errors
Indicates whether PHP errors are shown on screen. In production environments this is usually switched off for security reasons. - error_reporting
Determines which errors are reported.
Development: oftenE_ALL
Production: limited or disabled (for example0) - file_uploads
Enables or disables file uploads within PHP. - allow_url_fopen
Allows PHP to retrieve files via external URLs (HTTP/FTP). This can pose a security risk and is therefore sometimes disabled. - short_open_tag
Determines whether PHP code using<? ?>is recognised. It is recommended to always use the full<?php ?>syntax. - session.gc_maxlifetime
The number of seconds after which session data is considered expired and may be cleaned up. - session.cookie_secure
Ensures that session cookies are only sent over HTTPS. Strongly recommended for secure websites. - session.cookie_httponly
Makes cookies accessible only via HTTP(S), which offers protection against XSS attacks. - date.timezone
Sets the default time zone for all date and time functions in PHP.
Important advice
Changes to PHP settings can have a major impact on the operation, performance and security of your website. Ideally, test changes in a test or development environment first before applying them to a live website.