PHP
| Chevereto Version | PHP Version(s) |
|---|---|
| 5.0 | 8.3, 8.4 |
Note: PHP versions explicitly listed in the table above are officially supported. Using any other PHP version may result in unexpected behavior or compatibility issues.
Chevereto V5 is PHP software, it has been designed using:
- Chevere packages
- PHP packages from Ondřej Surý.
- PHP extensions provided by PECL.
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.
Resources
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.
Troubleshoot
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
Configuration
The following ini values are recommended for Chevereto installations.
Loaded configuration
Check which ini files are loaded at your Chevereto /dashboard.
upload_max_filesize = 64M;
post_max_size = 64M;
max_execution_time = 30;
memory_limit = 512M;
ffi.enable = true;| Property | Description | Example |
|---|---|---|
| upload_max_filesize | Maximum upload size | 64M |
| post_max_size | Maximum post size | 64M |
| max_execution_time | Maximum time to execute the software, in seconds | 30 |
| memory_limit | Maximum memory to allocate | 512M |
| ffi.enable | Enable FFI support (required for libvips) | true |
You can toggle this limits to reflect your hardware and server load. Check this article for more info: PHP common pitfalls.
Extensions
The following PHP extensions are required for Chevereto.
- bcmath
- curl
- exif
- fileinfo
- hash
- intl
- json
- pdo
- pdo-mysql (nd_pdo_mysql)
- session
- xml
The following extensions are optional for Chevereto.
- ffi
- ftp
- gd
- imagick
- opcache
Chevereto uses PDO for database access and it requires the MySQL Native Driver (mysqlnd).
Features
Chevereto requires unrestricted access to all PHP functions. Note that the following functions should not be restricted:
Image library
The image library (libvips, Imagick, GD) should be provided with support for AVIF JXL JPEG PNG BMP GIF WEBP. By default, Chevereto prefers Imagick for compatibility, then libvips and fallback to GD.
If you need to explicit use libvips you can pass this ENV:
CHEVERETO_IMAGE_LIBRARY=vipsIf 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:
CHEVERETO_IMAGE_FORMATS_AVAILABLE='["JPG","PNG","BMP","GIF"]'Filesystem
User running 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
- ./content
- ./images
- ./importing
User generated content is stored by default at:
- ./images
- ./content/images/users
- ./content/pages
In debian-based systems use the following command to set the right permissions in your Chevereto installation (change /var/www/html to reflect your path).
chown -R www-data: /var/www/html