PHP
Versions
Each domain can use any PHP version offered by the server (for example 8.3 and 8.4); change it on the Domains page. Your site runs under PHP-FPM as your own Unix user, so files you upload are directly readable and writable by PHP.
php.ini settings
The PHP page lets you set, for your whole account:
| Setting | Maximum |
|---|---|
memory_limit |
512M |
upload_max_filesize |
256M |
post_max_size |
256M |
max_execution_time |
300 seconds |
max_input_vars |
10000 |
display_errors |
on / off |
Other settings can be placed in a .user.ini file in your
document root; PHP-FPM reads it (with a short delay of up to five
minutes).
.htaccess
.htaccess files work (AllowOverride All):
rewrites, redirects, access control, custom error pages, and so on.
php_valueandphp_flaglines do not work under PHP-FPM and make Apache return a 500 error for the whole site. Exports from cPanel often contain them. Remove those lines and put the settings in.user.ini(or on the PHP page) instead. The error log on the Logs page shows the offending line.
Directory listings are off; symbolic links are followed only when they point to files you own.
Temporary files and sessions
PHP's upload directory, session storage and temp directory are inside
your home under tmp/. Clean it up occasionally if it
grows.