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:

  1. # File upload limit
  2. post_max_size = 16M
  3. upload_max_filesize = 16M
  4. # Max Execution Time
  5. max_execution_time = 90
  6. # Memory Limit
  7. memory_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:

  1. # Search "php70 swoole" mean swoole for php70
  2. yum search php70 swoole
  3. # Search result
  4. php70-php-pecl-swoole-devel.x86_64 : php70-php-pecl-swoole developer files
  5. : (header)
  6. php70-php-pecl-swoole2-devel.x86_64 : php70-php-pecl-swoole2 developer files
  7. : (header)
  8. php70-php-pecl-swoole4-devel.x86_64 : php70-php-pecl-swoole4 developer files
  9. : (header)
  10. php70-php-pecl-swoole.x86_64 : PHPs asynchronous concurrent distributed :
  11. : networking framework
  12. php70-php-pecl-swoole-serialize.x86_64 : Fast and Small serialize
  13. php70-php-pecl-swoole2.x86_64 : PHPs asynchronous concurrent distributed
  14. : networking framework
  15. php70-php-pecl-swoole4.x86_64 : PHPs asynchronous concurrent distributed
  16. : networking framework
  17. # select the lagest version to install
  18. yum 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:

**

  1. # Disable the php7.0
  2. yum-config-manager --disable remi-php70
  3. # Enable the php7.2
  4. yum-config-manager --enable remi-php72
  5. # Upgrade
  6. yum update -y
  7. # Restart Apache httpd
  8. systemctl restart httpd

You can’t change to a lower version of PHP on this Image