Using the Websoft9 Magento (LAMP), you should have some skills for configure PHP like below:
- Understand the PHP configuration (
php.ini) - View the installed PHP extensions
- Install PHP extensions( 10+ installation sample)
- PHP upgrade
- Change the version of PHP
For the above content, we have prepared the PHP Quik Start for users.
Top3 PHP configuration you must use when using this Image
#1 Modify the php.ini
When you want to modify The PHP File Upload Limit, Max Execution Time, Memory Limit…, please use SFTP to modify the /etc/php.ini, for example:
# File upload limitpost_max_size = 16Mupload_max_filesize = 16M# Max Execution Timemax_execution_time = 90# Memory Limitmemory_limit – Minimum: 256M
#2 Install php module
**
LAMP Image have installed the most useful modules, but some times you may want to intall more module according to your application. E.g Install the swoole, below are the steps:
# Search "php70 swoole" mean swoole for php70yum search php70 swoole# Search resultphp70-php-pecl-swoole-devel.x86_64 : php70-php-pecl-swoole developer files: (header)php70-php-pecl-swoole2-devel.x86_64 : php70-php-pecl-swoole2 developer files: (header)php70-php-pecl-swoole4-devel.x86_64 : php70-php-pecl-swoole4 developer files: (header)php70-php-pecl-swoole.x86_64 : PHPs asynchronous concurrent distributed :: networking frameworkphp70-php-pecl-swoole-serialize.x86_64 : Fast and Small serializephp70-php-pecl-swoole2.x86_64 : PHPs asynchronous concurrent distributed: networking frameworkphp70-php-pecl-swoole4.x86_64 : PHPs asynchronous concurrent distributed: networking framework# select the lagest version to installyum install -y php70-php-pecl-swoole4.x86_64
#3 Change the version of PHP
If you want to change to a higher version, E.g PHP7.0->PHP7.2, below are the steps:
**
# Disable the php7.0yum-config-manager --disable remi-php70# Enable the php7.2yum-config-manager --enable remi-php72# Upgradeyum update -y# Restart Apache httpdsystemctl restart httpd
You can’t change to a lower version of PHP on this Image
