# 🐘 PHP
Chevereto V4 is PHP (opens new window) software, it has been designed using:
- Chevere (opens new window)
- PHP packages (opens new window) from Ondřej Surý.
- PHP extensions (opens new window) provided by PECL (opens new window).
👉 Packages and PECL provides the same convenience, but as packages are made for debian-based systems, you should prefer PECL if you don't have a debian-compatible system.
💡 Packages not only contain the software, it could trigger other effects in the system.
- Website (opens new window)
- Language reference (opens new window)
- Function reference (opens new window)
# What it does?
PHP is the programming language used to write Chevereto application instructions, it is used for everything as it provides high flexibility to alter instructions on-the-fly at a minimum system performance footprint.
Having issues? Check the following common pitfalls:
- Outdated PHP version
- Misconfiguration in PHP libraries
- Bad php.ini directives
- Low execution time
- Bad sessions setup
- Open basedir restrictions
ini values are recommended for Chevereto installations.
upload_max_filesize = 64M; post_max_size = 64M; max_execution_time = 30; memory_limit = 512M;
|upload_max_filesize||Maximum upload size|
|post_max_size||Maximum post size||Same as above|
|max_execution_time||Maximum time to execute the software, in seconds|
|memory_limit||Maximum memory to allocate|
You can toggle this limits to reflect your hardware and server load. Check this article for more info: PHP common pitfalls (opens new window).
The following PHP extensions are required for Chevereto.
Chevereto requires unrestricted access to all PHP functions. Note that the following functions should not be restricted:
# Image library
The image library (GD, Imagick) should be provided with support for
PNG GIF JPG BMP WEBP. By default, Chevereto prefers Imagick and fallback to GD.
👉 If you need to explicit use GD you can pass this ENV:
👉 If the server doesn't provide support for all the image formats handled by Chevereto, the ENV must reflect only the system supported formats. In the following example Chevereto is configured with explicit support only for PNG, GIF, BMP and JPG (removes WEBP):
# Configuring ImageMagick
Additional recommended ImageMagick configuration at
<policymap> <!-- policies --> <policy domain="resource" name="width" value="16KP"/> <policy domain="resource" name="height" value="16KP"/> </policymap>
php must be in the owner group of the installation directory and Chevereto requires recursive read access to that directory. In addition to this, following paths require recursive read/write access:
- Session path
- Temp folder
User generated content is stored at: