KeyHelp lets you change PHP settings per user through the web interface, and supports several PHP versions side by side so that one site can be updated without affecting the others.
Choosing the PHP version for a domain
PHP versions are installed under Configuration → PHP interpreter. For an individual site, open the domain and select the version on the Interpreter tab.
Before switching to a newer version, make sure your CMS and its extensions support it — each major PHP release removes functions deprecated earlier, and an out-of-date plugin can bring the site down. Take a backup first, and switch back if something breaks.
Changing PHP settings
- Go to User administration and click Edit for the user concerned.
- Switch to the PHP tab. The most commonly needed parameters are listed there and can be changed directly.
- If the parameter you need is not in the list, add it in the Additional PHP settings field at the bottom of the page, in
parameter = valueform.
The settings usually worth changing
- memory_limit — how much memory one script may use. Content management systems with many extensions often need more than the default.
- upload_max_filesize and post_max_size — the maximum upload size. Raise both together: an upload is also a POST request, so raising the first alone has no effect.
- max_execution_time — how long a script may run. Relevant for imports and other long operations.
- date.timezone — used by all date and time functions.
- display_errors — keep this off on a live site. Errors shown to visitors reveal file paths and other details useful to an attacker; use log_errors and read the log instead.
Settings apply to the user, so they affect all of that user's domains. Changes take effect once PHP is restarted, which the panel handles itself.
Additional PHP modules
Modules that are not part of the standard set have to be installed on the server, which requires root access. Alternative PHP versions live in /opt/keyhelp/php/<version>, so a module has to be built for the specific version that your site uses — a module installed for one version is invisible to another.
In outline, the procedure is: install the build dependencies, build the module with the pecl binary belonging to that PHP version, add it to the extensions section of the version's php.ini, and enable it with phpenmod. The exact dependencies depend on the module and on the operating system release.
Unless you specifically want to do this yourself, open a ticket telling us the module you need and the site it is for — we will build it for the right PHP version and check that it loads.
Checking the result
The simplest check is your CMS itself: the warning about the missing extension or the exceeded limit should disappear. Bear in mind that the command line may use a different PHP version from the website, so php -m run over SSH does not necessarily reflect what the site sees.
If a setting has no effect or a module does not load, open a ticket from your client area with the domain name and the PHP version in use.