Skip to content

PHP Settings ​

KiwiPanel gives you per-website control over PHP configuration. Each website can have its own PHP version, performance tuning, error handling, and open_basedir override — all managed from one page. Security directives like disable_functions are managed server-wide at Settings → PHP Security.

Navigate to Websites → (your site) → PHP to access the PHP settings page.

TIP

Changes take effect immediately after saving. KiwiPanel writes the settings to a per-vhost PHP configuration and reloads the web server — no manual restart needed.

PHP Version ​

Each website can run a different PHP version. KiwiPanel detects which versions are installed on your server and shows them in a dropdown.

VersionStatus
PHP 8.4Latest stable
PHP 8.3Active support
PHP 8.2Security fixes only
PHP 8.1End of life
PHP 7.4End of life

WARNING

Changing the PHP version restarts the PHP process for that website. Active requests will be terminated. Do this during low-traffic periods.

To change the PHP version:

  1. Open your website's PHP settings page
  2. Select the desired version from the PHP Version dropdown
  3. Click Save Settings

The page will reload and show the new version with its installed extensions.


Settings Overview ​

PHP settings are organized into five categories on the settings page. Each setting shows its current value, which you can modify directly.

Resource Limits ​

Control how much CPU and memory PHP can use per request.

SettingDefaultDescription
memory_limit256MMaximum memory a single script can consume. Increase for memory-intensive applications (e.g., WordPress with WooCommerce).
max_execution_time30Maximum seconds a script can run before being terminated. Increase for long-running tasks like imports or report generation.
max_input_time60Maximum seconds PHP will spend parsing request data (POST, GET, file uploads).
max_input_vars1000Maximum number of input variables accepted. Increase if you have forms with many fields (e.g., WooCommerce product variations).

TIP

For WordPress with WooCommerce, recommended values are:

  • memory_limit: 512M
  • max_execution_time: 300
  • max_input_vars: 5000

File Upload ​

Control file upload sizes and limits.

SettingDefaultDescription
upload_max_filesize64MMaximum size of a single uploaded file. Must be ≤ post_max_size.
post_max_size64MMaximum size of the entire POST body (all files + form data combined). Must be ≥ upload_max_filesize.
max_file_uploads20Maximum number of files that can be uploaded in a single request.

WARNING

post_max_size must be greater than or equal to upload_max_filesize. If post_max_size is smaller, uploads will silently fail.

Error Handling ​

Control how PHP reports and logs errors.

SettingDefaultDescription
display_errorsOffWhether to show errors directly on web pages. Never enable in production — error messages can leak sensitive information.
error_reportingE_ALL & ~E_DEPRECATED & ~E_STRICTWhich types of errors to report. E_ALL catches everything; the default skips deprecation and strict notices.
log_errorsOnWhether to write errors to the website's error log file. Always keep this enabled for debugging.

Recommended for development:

display_errors: On
error_reporting: E_ALL
log_errors: On

Recommended for production:

display_errors: Off
error_reporting: E_ALL & ~E_DEPRECATED & ~E_STRICT
log_errors: On

Session ​

Control PHP session behavior.

SettingDefaultDescription
session.gc_maxlifetime1440Seconds before session data is considered garbage and eligible for cleanup. Default is 24 minutes.
session.cookie_lifetime0Lifetime of the session cookie in seconds. 0 means the cookie expires when the browser closes.

Other ​

Additional PHP settings for timezone and caching.

SettingDefaultDescription
date.timezoneUTCDefault timezone for date/time functions. Set this to your target audience's timezone.
opcache.enable1Enable PHP's opcode cache. Significantly improves performance by caching compiled PHP scripts. Always keep enabled in production.
opcache.memory_consumption128Memory allocated for opcode caching in MB. Increase for large applications with many PHP files.

Installed Extensions ​

The PHP settings page shows a list of extensions currently installed for your website's PHP version. Extensions are labeled as:

  • core (green badge) — Built-in extensions that are part of PHP itself (e.g., json, date, pcre). These cannot be removed.
  • ext (blue badge) — Additional extensions installed via the system package manager (e.g., gd, intl, redis). These can be installed or removed by an administrator.

The extension list is version-specific — PHP 8.3 and PHP 8.4 can have completely different extensions installed.

Installing New Extensions ​

Extension management depends on your role:

If you are an administrator:

Go to Settings → Services to install or remove PHP extensions. Extensions are managed per PHP version — you can install php8.4-redis independently from php8.3-redis.

If you are a regular user:

Contact your server administrator to request extension installation. Let them know:

  • Which extension you need (e.g., gd, redis, imagick)
  • Which PHP version it should be installed for

Commonly Used Extensions ​

ExtensionPackageDescription
GDphpX.Y-gdImage processing (JPEG, PNG, GIF, WebP)
ImagickphpX.Y-imagickAdvanced image processing via ImageMagick
IntlphpX.Y-intlInternationalization (number/date formatting, collation)
mbstringphpX.Y-mbstringMultibyte string handling (UTF-8, CJK)
MySQLphpX.Y-mysqlMySQL/MariaDB database support
PostgreSQLphpX.Y-pgsqlPostgreSQL database support
RedisphpX.Y-redisRedis in-memory data store client
cURLphpX.Y-curlHTTP client for external API calls
ZipphpX.Y-zipZIP archive creation and extraction
BCMathphpX.Y-bcmathArbitrary precision mathematics
SoapphpX.Y-soapSOAP web services client/server
XMLphpX.Y-xmlXML parsing and manipulation

Replace X.Y with your PHP version (e.g., php8.4-redis).


Custom Directives ​

For settings not available in the UI, you can add custom PHP directives directly. These are written as raw php.ini syntax and applied to your website's PHP configuration.

ini
; Example custom directives
realpath_cache_size = 4096k
realpath_cache_ttl = 600
output_buffering = 4096

WARNING

Invalid directives may cause PHP to fail. Test changes carefully and check the error log if your website stops working after saving.

INFO

Your administrator may disable custom directives for your account. If the custom directives section is not visible, contact your administrator.


Security Settings ​

PHP security is split into two tiers: global settings managed server-wide, and per-website overrides for open_basedir only. For a complete guide to PHP security layers, see PHP Security.

Global Security Settings (PHP_INI_SYSTEM) ​

The following directives are PHP_INI_SYSTEM — they can only be set at the server level and apply to all websites. They are managed at Settings → PHP Security (/settings/php-security).

disable_functions ​

Controls which PHP functions are blocked from being called. Four presets are available:

PresetDescription
Standard (default)Blocks dangerous functions like exec, system, passthru, shell_exec, proc_open, popen. Best for most websites.
RelaxedAllows some functions that Standard blocks. Use for applications that need controlled system access (e.g., some WordPress plugins).
NoneNo functions are blocked. Not recommended for production.
CustomSpecify your own comma-separated list of disabled functions.

INFO

The per-website PHP page shows the active disable_functions preset and the resolved function list as a read-only card. To change it, click the Manage in Settings button which links to Settings → PHP Security.

Other Global Directives ​

SettingDefaultDescription
expose_phpOffHides X-Powered-By: PHP/x.x header from responses. Keep disabled to avoid leaking version information.
allow_url_includeOffBlocks include() and require() from loading remote URLs. Never enable this — it's one of the most exploited PHP misconfigurations.
session.cookie_httponlyOnPrevents JavaScript from accessing session cookies, mitigating XSS cookie theft.
session.cookie_secureOnSession cookies are only sent over HTTPS connections.
session.use_strict_modeOnRejects session IDs not generated by PHP, preventing session fixation attacks.

Per-Website: open_basedir ​

open_basedir is the only security directive that can be overridden per-website. It restricts which directories PHP can access on the filesystem. When enabled, PHP can only read files within the website's home directory and a few system paths (/tmp, etc.).

To customize open_basedir for a single website:

  1. Open the website's PHP settings page
  2. Scroll to the open_basedir Settings card
  3. Uncheck Use global open_basedir defaults
  4. Toggle the open_basedir switch and optionally add extra allowed paths
  5. Click Save open_basedir Settings

A badge indicates when a site has a custom override active. To revert, re-check Use global open_basedir defaults and save.

TIP

All other security directives (disable_functions, expose_php, allow_url_include, session.*) are PHP_INI_SYSTEM and cannot be overridden per-website. They are enforced server-wide via Settings → PHP Security.


How It Works ​

Under the hood, KiwiPanel manages PHP settings through multiple configuration layers:

┌─────────────────────────────────┐
│ php.ini (system-wide defaults)  │  ← Managed by the OS package
├─────────────────────────────────┤
│ mods-available/*.ini            │  ← Global security (disable_functions,
│                                 │    expose_php, allow_url_include, session.*)
│                                 │    Managed via Settings → PHP Security
├─────────────────────────────────┤
│ OLS vhost phpIniOverride        │  ← Per-site settings (memory_limit, etc.)
│                                 │    + per-site open_basedir override
├─────────────────────────────────┤
│ .user.ini (user overrides)      │  ← User-created (limited by PHP_INI_USER)
└─────────────────────────────────┘
         ↓ later layers override earlier ones

Important: PHP_INI_SYSTEM directives (disable_functions, expose_php, allow_url_include, session.cookie_httponly, session.cookie_secure, session.use_strict_mode) are set globally via mods-available/*.ini and apply to all websites. They cannot be overridden per-website because PHP enforces this restriction at the engine level.

Settings applied via php_admin_value in the OLS vhost config (like open_basedir) cannot be overridden by .user.ini or ini_set() — this is also enforced by PHP itself.


Verifying PHP Settings ​

After changing PHP settings in KiwiPanel, you can verify they are applied correctly by inspecting the live configuration from the website itself.

Using the KiwiPanel test file ​

KiwiPanel includes a ready-made inspector at test/manual/ini.php. Copy it to your website and open it in a browser:

  1. Copy the file to your website's document root:
    bash
    cp /path/to/kiwipanel/test/manual/ini.php /home/username/public_html/ini.php
  2. Open it in your browser:
    https://yourdomain.com/ini.php
  3. The page displays all KiwiPanel-managed settings (resource limits, upload sizes, error handling, sessions, OPcache, security directives) along with installed extensions.
  4. Click View Full phpinfo() for the complete PHP information output.

DANGER

Delete ini.php immediately after testing. The file exposes sensitive server configuration — PHP version, loaded extensions, file paths, and security settings — that attackers can use to target your site.

bash
rm /home/username/public_html/ini.php

Quick alternative ​

If you just need a quick check, create a minimal file instead:

php
<?php phpinfo();

Save it as info.php in your public_html/ directory, open https://yourdomain.com/info.php, then delete it right away.


Troubleshooting ​

Changes not taking effect ​

  1. Make sure you clicked Save Settings after making changes
  2. Clear your application's cache (e.g., wp cache flush for WordPress)
  3. Check if your application has its own PHP configuration (.user.ini in public_html/)
  4. Wait a few seconds — OpenLiteSpeed may take a moment to reload

Website shows blank page after changing settings ​

  1. Check the error log: Websites → (your site) → Logs
  2. Common cause: memory_limit set too low for your application
  3. Common cause: invalid value in custom directives
  4. Try resetting to defaults by clicking Reset Settings

Upload failing silently ​

  1. Ensure post_max_size ≥ upload_max_filesize
  2. Check that max_file_uploads allows enough files
  3. Your web server may also have its own upload limit (OpenLiteSpeed default is 2GB)

Extensions not showing up ​

  1. Extensions are fetched from the server in real-time. If the agent is unreachable, the extensions section won't appear.
  2. After installing a new extension via Settings → Services, reload the PHP settings page to see it.
  3. Different PHP versions have independent extension sets — check you're looking at the right version.