PHP Installation
Tadreeb LMS supports PHP 8.2 only. Other PHP versions are not recommended and may lead to unexpected issues.
Supported PHP Version
Before installing PHP, ensure that your system meets the
System Requirements.
- PHP 8.2 – Required and officially supported
PHP must be installed for:
- The web server (Apache)
- The command-line interface (CLI)
⚠️ Both Apache and CLI must use the same PHP version (8.2).
Required PHP Extensions
The following PHP extensions must be installed and enabled for Tadreeb LMS to function correctly:
php8.2– Core PHP 8.2 packagephp8.2-cli– Command-line interface for PHPphp8.2-common– Common PHP filesphp8.2-mbstring– Multibyte string supportphp8.2-xml– XML support (DOM, SimpleXML, XMLReader/Writer)php8.2-curl– cURL support for HTTP requestsphp8.2-zip– ZIP archive supportphp8.2-mysql– MySQL/MariaDB drivers (MySQLi & PDO)php8.2-bcmath– Arbitrary precision mathematicsphp8.2-gd– Image processing (GD library)
These extensions are installed through standard OS packages, for example:
php8.2-mysqlphp8.2-xmlphp8.2-mbstring
✅ No additional database connector configuration is required beyond installing the PHP MySQL extension.
Verifying Installed Extensions
To confirm that a PHP extension is enabled, run:
php -m | grep -i <extension_name>
If the extension name appears in the output, it is enabled.
PHP Configuration (php.ini)
The following php.ini values must be configured for Tadreeb LMS:
memory_limit = 512M
upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 300
max_input_time = 300
max_input_vars = 5000
date.timezone = UTC
These settings are required to:
- Prevent installer timeouts
- Allow large file uploads
- Ensure stable request processing
ℹ️ Values can be increased further based on project requirements.
Notes on PHP Configuration
Multiple php.ini Files
PHP uses different configuration files depending on how it is executed.
Common locations on Ubuntu:
-
Apache
/etc/php/8.2/apache2/php.ini -
CLI
/etc/php/8.2/cli/php.ini
Ensure that the required configuration values are applied consistently in both files.
Identify Active Configuration
-
For CLI:
php --ini -
For Web:
- Use a
phpinfo()page, or - Check the Apache PHP handler configuration
- Use a
Restart Services
After installing PHP extensions or modifying php.ini, restart Apache:
sudo systemctl restart apache2
✅ PHP is now correctly configured for Tadreeb LMS.