From 4449c50137d4b0b9dd25b9ec7b74f2d8c86b3bac Mon Sep 17 00:00:00 2001 From: maeker12 <{ID}+{username}@users.noreply.github.com> Date: Fri, 25 Sep 2020 10:11:37 -0500 Subject: [PATCH 01/15] Add info about optimized realpath_cache_settings --- .../project/magento-app-php-application.md | 99 +++---------------- src/cloud/project/magento-app-php-ini.md | 36 +++++-- .../v2.4/install-gde/prereq/php-settings.md | 27 ++++- .../performance-best-practices/software.md | 9 ++ 4 files changed, 76 insertions(+), 95 deletions(-) diff --git a/src/cloud/project/magento-app-php-application.md b/src/cloud/project/magento-app-php-application.md index 38456477a7d..ecd4d422511 100644 --- a/src/cloud/project/magento-app-php-application.md +++ b/src/cloud/project/magento-app-php-application.md @@ -41,96 +41,19 @@ php -m For details about a specific PHP extension, see the [PHP Extension List](https://www.php.net/manual/en/extensions.alphabetical.php). -{{site.data.var.ece}} supports the following extensions: +The following table show the supported PHP extensions when deploying {{site.data.var.ee}} on the Cloud platform. -- Default extensions: - - `bcmath` - - `bz2` - - `calendar` - - `exif` - - `gd` - - `gettext` - - `intl` - - `mysqli` - - `pcntl` - - `pdo_mysql` - - `soap` - - `sockets` - - `sysvmsg` - - `sysvsem` - - `sysvshm` - - `opcache` - - `zip` +- **Default extensions** are the default extensions available with the PHP application. +- **Required extensions** are installed automatically and cannot be removed +- **Optional extensions**–You can install and remove these extensions as needed -- Extensions that are installed and cannot be uninstalled: - - `ctype` - - `curl` - - `date` - - `dom` - - `fileinfo` - - `filter` - - `ftp` - - `hash` - - `iconv` - - `json` - - `mbstring` - - `mysqlnd` - - `openssl` - - `pcre` - - `pdo` - - `pdo_sqlite` - - `phar` - - `posix` - - `readline` - - `session` - - `sqlite3` - - `tokenizer` - - `xml` - - `xmlreader` - - `xmlwriter` - -- Extensions that can be installed and uninstalled as needed: - - `bcmath` - - `bz2` - - `calendar` - - `exif` - - `gd` - - `geoip` - - `gettext` - - `gmp` - - `igbinary` - - `imagick` - - `imap` - - `intl` - - `ioncube` - - `ldap` - - `mailparse` - - `mcrypt` - - `msgpack` - - `mysqli` - - `oauth` - - `opcache` - - `pdo_mysql` - - `propro` - - `pspell` - - `raphf` - - `recode` - - `redis` - - `shmop` - - `soap` - - `sockets` - - `sodium` - - `ssh2` - - `sysvmsg` - - `sysvsem` - - `sysvshm` - - `tidy` - - `xdebug` - - `xmlrpc` - - `xsl` - - `yaml` - - `zip` - - `pcntl` +| Default extensions | Required extensions | Optional extensions | +|--------------------|---------------------|---------------------| +| `ctype`
`curl`
`date`
`dom`
`fileinfo`
`filter`
`ftp`
`hash`
`iconv`
`json`
`mbstring`
`mysqlnd`
`openssl`
`pcre`
`pdo`
`pdo_sqlite`
`phar`
`posix`
`readline`
`session`
`sqlite3`
`tokenizer`
`xml`
`xmlreader`
`xmlwriter`
| `ctype`
`curl`
`date`
`dom`
`fileinfo`
`filter`
`ftp`
`hash`
`iconv`
`json`
`mbstring`
`mysqlnd`
`openssl`
`pcre`
`pdo`
`pdo_sqlite`
`phar`
`posix`
`readline`
`session`
`sqlite3`
`tokenizer`
`xml`
`xmlreader`
`xmlwriter`
| `bcmath`
`bz2`
`calendar`
`exif`
`gd`
`geoip`
`gettext`
`gmp`
`igbinary`
`imagick`
`imap`
`intl`
`ioncube`
`ldap`
`mailparse`
`mcrypt`
`msgpack`
`mysqli`
`oauth`
`opcache`
`pdo_mysql`
`propro`
`pspell`
`raphf`
`recode`
`redis`
`shmop`
`soap`
`sockets`
`sodium`
`ssh2`
`sysvmsg`
`sysvsem`
`sysvshm`
`tidy`
`xdebug`
`xmlrpc`
`xsl`
`yaml`
`zip`
`pcntl`
| {:.bs-callout-warning} PHP compiled with debug is not supported and the Probe may conflict with XDebug or XHProf. Disable those extensions when enabling the Probe. The Probe conflicts with some PHP extensions like Pinba or IonCube. + +### Custom PHP configuration + +You can customize the PHP settings for a Cloud environment by adding a `php.ini` file to your project. See [Customize PHP.INI]({{ site.baseurl }}/cloud/project/magento-app-php-ini.html). diff --git a/src/cloud/project/magento-app-php-ini.md b/src/cloud/project/magento-app-php-ini.md index c6bd2825454..ad8c5b90c3b 100644 --- a/src/cloud/project/magento-app-php-ini.md +++ b/src/cloud/project/magento-app-php-ini.md @@ -6,22 +6,46 @@ functional_areas: - Setup - Application --- -You can also create and push a `php.ini` file that is appended to the configuration maintained by {{site.data.var.ee}}. -In your repository, the `php.ini` file should be added to the root of the application (the repository root). +You can customize the PHP settings for your environment using a `php.ini` file that is appended to the configuration maintained by {{site.data.var.ee}}. + +In your repository, add the `php.ini` file to the root of the application (the repository root). {:.bs-callout-info} Configuring PHP settings improperly can cause issues. We recommend only advanced administrators set these options. -For example, if you need to increase the PHP memory limit: +## Increase PHP memory limit -```bash +To increase the PHP memory limit, add the following setting to the php.ini file: + +```php memory_limit = 756M ``` -For a list of recommended PHP configuration settings, see [Required PHP settings]({{ site.baseurl }}/guides/v2.3/install-gde/prereq/php-settings.html). +## Optimize realpath_cache configuration + +Set the following `realpath_cache` settings to improve Magento performance. + +```php +; +; Increase realpath cache size +; +realpath_cache_size = 1M + +; +; Increase realpath cache ttl +; +realpath_cache_ttl = 7200 +``` + +These settings allow PHP processes to cache paths to files instead of looking them up each time a page loads. See [Performance Tuning](https://www.php.net/manual/en/ini.core.php) in the PHP documentation. + +{:.bs-callout-info} +For a list of recommended PHP configuration settings, see [Required PHP settings]({{ site.baseurl }}/guides/v2.4/install-gde/prereq/php-settings.html). + +## Check custom php.ini settings -After pushing your file, you can check that the custom PHP configuration has been added to your environment by [creating an SSH tunnel]({{ site.baseurl }}/cloud/env/environments-start.html#env-start-tunn) to your environment and entering: +After pushing the `php.ini` changes to your Cloud environment, you can check that the custom PHP configuration has been added to your environment by [creating an SSH tunnel]({{ site.baseurl }}/cloud/env/environments-start.html#env-start-tunn) to your environment and entering: ```bash cat /etc/php5/fpm/php.ini diff --git a/src/guides/v2.4/install-gde/prereq/php-settings.md b/src/guides/v2.4/install-gde/prereq/php-settings.md index 55b7ca95294..8a33b0bb95d 100644 --- a/src/guides/v2.4/install-gde/prereq/php-settings.md +++ b/src/guides/v2.4/install-gde/prereq/php-settings.md @@ -73,6 +73,15 @@ PHP Warning: date(): It is not safe to rely on the system's timezone settings. - Installing and updating Magento components from Magento Marketplace, `2G` - Testing, `~3-4G` +- Increase the values for the PHP `realpath_cache_size` and `realpath_cache_ttl` to recommended settings: + + ```conf + realpath_cache_size=1M + realpath_cache_ttl=7200 + ``` + + These settings allow PHP processes to cache paths to files instead of looking them up each time a page loads. See [Performance Tuning](https://www.php.net/manual/en/ini.core.php) in the PHP documentation. + - Enable [`opcache.save_comments`](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.save-comments){:target="_blank"}, which is required for Magento 2.1 and later. We recommend you enable the [PHP OPcache](https://www.php.net/manual/en/book.opcache.php){:target="_blank"} for performance reasons. The OPcache is enabled in many PHP distributions. @@ -80,7 +89,7 @@ PHP Warning: date(): It is not safe to rely on the system's timezone settings. Magento 2.1 and later use PHP code comments for code generation. {:.bs-callout-info} -To avoid issues during installation and upgrade, we strongly recommend you apply the same PHP settings to both the PHP command-line configuration and the PHP web server plug-in's configuration. For more information, see the next section. +To avoid issues during installation and upgrade, we strongly recommend you apply the same PHP settings to both the PHP command-line configuration and the PHP web server plug-in configuration. For more information, see the next section. ## Step 1: Find PHP configuration files {#php-required-find} @@ -136,6 +145,7 @@ To set PHP options: ``` 1. Add the time zone setting you found in step 2. + 1. Change the value of `memory_limit` to one of the values at the beginning of this section. For example, @@ -144,7 +154,22 @@ To set PHP options: memory_limit=2G ``` +1. Add or update the `realpath_cache` configuration to match the following values: + + ```conf + ; + ; Increase realpath cache size + ; + realpath_cache_size = 1M + + ; + ; Increase realpath cache ttl + ; + realpath_cache_ttl = 7200 + ``` + 1. Save your changes and exit the text editor. + 1. Open the other `php.ini` (if they are different) and make the same changes in it. ## Step 3: Set OPcache options {#php-required-opcache} diff --git a/src/guides/v2.4/performance-best-practices/software.md b/src/guides/v2.4/performance-best-practices/software.md index 70a0d2ac242..08104e7ed22 100644 --- a/src/guides/v2.4/performance-best-practices/software.md +++ b/src/guides/v2.4/performance-best-practices/software.md @@ -60,6 +60,15 @@ To guarantee successful execution of all Magento instances without dumping data `memory_limit=768MB` +#### Realpath_cache configuration + +To improve Magento performance, add or update the following recommended `realpath_cache` settings in the `php.ini` file. This configuration allows PHP processes to cache paths to files instead of looking them up each time a page loads. See [Performance Tuning](https://www.php.net/manual/en/ini.core.php) in the PHP documentation. + +```bash +realpath_cache_size=1M +realpath_cache_ttl=7200 +``` + #### ByteCode To get maximum speed out of Magento 2 on PHP 7, you must activate the OpCache module and properly configure it. These settings are recommended for the module: From 200ec4ea1495acd3f75b2a6ba557b6e20aa33c36 Mon Sep 17 00:00:00 2001 From: maeker12 <{ID}+{username}@users.noreply.github.com> Date: Fri, 25 Sep 2020 14:54:08 -0500 Subject: [PATCH 02/15] Fix markdown syntax. --- src/cloud/project/magento-app-php-application.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cloud/project/magento-app-php-application.md b/src/cloud/project/magento-app-php-application.md index ecd4d422511..5c463237bcd 100644 --- a/src/cloud/project/magento-app-php-application.md +++ b/src/cloud/project/magento-app-php-application.md @@ -16,7 +16,7 @@ type: php: ### PHP extensions -You can enable additional PHP extensions in the `runtime:extension` section. Also, the extensions specified become available in the Docker PHP containers. +You can enable or disable PHP extensions in the `runtime:extension` section. Also, the extensions specified become available in the Docker PHP containers. > .magento.app.yaml @@ -43,9 +43,9 @@ For details about a specific PHP extension, see the [PHP Extension List](https:/ The following table show the supported PHP extensions when deploying {{site.data.var.ee}} on the Cloud platform. -- **Default extensions** are the default extensions available with the PHP application. -- **Required extensions** are installed automatically and cannot be removed -- **Optional extensions**–You can install and remove these extensions as needed +- **Default extensions** install by automatically. You can disable them as needed. +- **Required extensions** install automatically and cannot be removed. +- **Optional extensions**–You can add or disable these extensions as needed. | Default extensions | Required extensions | Optional extensions | |--------------------|---------------------|---------------------| From a43322e00a09106633407e453e315beb6140ef42 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Fri, 25 Sep 2020 15:01:42 -0500 Subject: [PATCH 03/15] Update src/cloud/project/magento-app-php-application.md Co-authored-by: Barny Shergold --- src/cloud/project/magento-app-php-application.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cloud/project/magento-app-php-application.md b/src/cloud/project/magento-app-php-application.md index 5c463237bcd..9711ec40e13 100644 --- a/src/cloud/project/magento-app-php-application.md +++ b/src/cloud/project/magento-app-php-application.md @@ -41,7 +41,7 @@ php -m For details about a specific PHP extension, see the [PHP Extension List](https://www.php.net/manual/en/extensions.alphabetical.php). -The following table show the supported PHP extensions when deploying {{site.data.var.ee}} on the Cloud platform. +The following table shows the supported PHP extensions when deploying {{site.data.var.ee}} on the Cloud platform. - **Default extensions** install by automatically. You can disable them as needed. - **Required extensions** install automatically and cannot be removed. From 1de799b716b4fcc65a9462b1ab63281164e53af7 Mon Sep 17 00:00:00 2001 From: maeker12 <{ID}+{username}@users.noreply.github.com> Date: Fri, 25 Sep 2020 17:45:05 -0500 Subject: [PATCH 04/15] Fix PHP extension table --- src/cloud/project/magento-app-php-application.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/cloud/project/magento-app-php-application.md b/src/cloud/project/magento-app-php-application.md index 5c463237bcd..4ae5aa6406c 100644 --- a/src/cloud/project/magento-app-php-application.md +++ b/src/cloud/project/magento-app-php-application.md @@ -41,15 +41,16 @@ php -m For details about a specific PHP extension, see the [PHP Extension List](https://www.php.net/manual/en/extensions.alphabetical.php). -The following table show the supported PHP extensions when deploying {{site.data.var.ee}} on the Cloud platform. +The following table shows the supported PHP extensions when deploying {{site.data.var.ee}} on the Cloud platform. -- **Default extensions** install by automatically. You can disable them as needed. - **Required extensions** install automatically and cannot be removed. -- **Optional extensions**–You can add or disable these extensions as needed. +- **Default extensions** install automatically. You can disable them as needed. +- **Optional extensions**–You can add these extensions as needed. -| Default extensions | Required extensions | Optional extensions | -|--------------------|---------------------|---------------------| -| `ctype`
`curl`
`date`
`dom`
`fileinfo`
`filter`
`ftp`
`hash`
`iconv`
`json`
`mbstring`
`mysqlnd`
`openssl`
`pcre`
`pdo`
`pdo_sqlite`
`phar`
`posix`
`readline`
`session`
`sqlite3`
`tokenizer`
`xml`
`xmlreader`
`xmlwriter`
| `ctype`
`curl`
`date`
`dom`
`fileinfo`
`filter`
`ftp`
`hash`
`iconv`
`json`
`mbstring`
`mysqlnd`
`openssl`
`pcre`
`pdo`
`pdo_sqlite`
`phar`
`posix`
`readline`
`session`
`sqlite3`
`tokenizer`
`xml`
`xmlreader`
`xmlwriter`
| `bcmath`
`bz2`
`calendar`
`exif`
`gd`
`geoip`
`gettext`
`gmp`
`igbinary`
`imagick`
`imap`
`intl`
`ioncube`
`ldap`
`mailparse`
`mcrypt`
`msgpack`
`mysqli`
`oauth`
`opcache`
`pdo_mysql`
`propro`
`pspell`
`raphf`
`recode`
`redis`
`shmop`
`soap`
`sockets`
`sodium`
`ssh2`
`sysvmsg`
`sysvsem`
`sysvshm`
`tidy`
`xdebug`
`xmlrpc`
`xsl`
`yaml`
`zip`
`pcntl`
| +{:.php-plugins-table} +| Required extensions | Default extensions | Optional extensions | +|---------------------|---------------------|---------------------| +`ctype`
`curl`
`date`
`dom`
`fileinfo`
`filter`
`ftp`
`hash`
`iconv`
`json`
`mbstring`
`mysqlnd`
`openssl`
`pcre`
`pdo`
`pdo_sqlite`
`phar`
`posix`
`readline`
`session`
`sqlite3`
`tokenizer`
`xml`
`xmlreader`
`xmlwriter`
| `bcmath`
`bz2`
`calendar`
`exif`
`gd`
`gettext`
`intl`
`mysqli`
`pcntl`
`pdo_mysql`
`soap`
`sockets`
`sysvmsg`
`sysvsem`
`sysvshm`
`opcache`
`zip` |`geoip`
`gmp`
`igbinary`
`imagick`
`imap`
`ioncube`
`ldap`
`mailparse`
`mcrypt`
`msgpack`
`mysqli`
`oauth`
`pdo_mysql`
`propro`
`pspell`
`raphf`
`recode`
`redis`
`shmop` `sockets`
`sodium`
`ssh2`
`tidy`
`xdebug`
`xmlrpc`
`xsl`
`yaml`| {:.bs-callout-warning} PHP compiled with debug is not supported and the Probe may conflict with XDebug or XHProf. Disable those extensions when enabling the Probe. The Probe conflicts with some PHP extensions like Pinba or IonCube. From 6c3246a3989528515d637103120b5e2a76fbac02 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Fri, 25 Sep 2020 17:51:49 -0500 Subject: [PATCH 05/15] Apply suggestions from code review --- src/cloud/project/magento-app-php-ini.md | 2 +- src/guides/v2.4/performance-best-practices/software.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cloud/project/magento-app-php-ini.md b/src/cloud/project/magento-app-php-ini.md index ad8c5b90c3b..7f609f49f0d 100644 --- a/src/cloud/project/magento-app-php-ini.md +++ b/src/cloud/project/magento-app-php-ini.md @@ -26,7 +26,7 @@ memory_limit = 756M Set the following `realpath_cache` settings to improve Magento performance. -```php +```conf ; ; Increase realpath cache size ; diff --git a/src/guides/v2.4/performance-best-practices/software.md b/src/guides/v2.4/performance-best-practices/software.md index 08104e7ed22..94e66637574 100644 --- a/src/guides/v2.4/performance-best-practices/software.md +++ b/src/guides/v2.4/performance-best-practices/software.md @@ -64,7 +64,7 @@ To guarantee successful execution of all Magento instances without dumping data To improve Magento performance, add or update the following recommended `realpath_cache` settings in the `php.ini` file. This configuration allows PHP processes to cache paths to files instead of looking them up each time a page loads. See [Performance Tuning](https://www.php.net/manual/en/ini.core.php) in the PHP documentation. -```bash +```text realpath_cache_size=1M realpath_cache_ttl=7200 ``` From ae9bca2477ad20b9366bd924261079fab73f47cc Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Fri, 25 Sep 2020 17:55:06 -0500 Subject: [PATCH 06/15] Update src/cloud/project/magento-app-php-application.md --- src/cloud/project/magento-app-php-application.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cloud/project/magento-app-php-application.md b/src/cloud/project/magento-app-php-application.md index 9711ec40e13..ffa71bb36a7 100644 --- a/src/cloud/project/magento-app-php-application.md +++ b/src/cloud/project/magento-app-php-application.md @@ -43,8 +43,8 @@ For details about a specific PHP extension, see the [PHP Extension List](https:/ The following table shows the supported PHP extensions when deploying {{site.data.var.ee}} on the Cloud platform. -- **Default extensions** install by automatically. You can disable them as needed. - **Required extensions** install automatically and cannot be removed. +- **Default extensions** install by automatically. You can disable them as needed. - **Optional extensions**–You can add or disable these extensions as needed. | Default extensions | Required extensions | Optional extensions | From 39c70cc8a512824a134bfe53eca6d915e2f174b4 Mon Sep 17 00:00:00 2001 From: maeker12 <{ID}+{username}@users.noreply.github.com> Date: Mon, 28 Sep 2020 18:26:52 -0500 Subject: [PATCH 07/15] - Fix link syntax and remove related topics from Prerequisites topic - Correct recommended memory limit and realpath_cache values - Corrected table with supported PHP extensions per review feedback --- src/cloud/project/magento-app-php-application.md | 12 +++++------- src/cloud/project/magento-app-php-ini.md | 4 +++- src/guides/v2.3/config-guide/multi-site/ms_nginx.md | 4 ++-- src/guides/v2.4/install-gde/prereq/php-settings.md | 10 +++++----- .../v2.4/install-gde/prereq/prereq-overview.md | 12 +----------- .../v2.4/performance-best-practices/software.md | 6 ++++-- 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/src/cloud/project/magento-app-php-application.md b/src/cloud/project/magento-app-php-application.md index 4ae5aa6406c..42b7a40a96d 100644 --- a/src/cloud/project/magento-app-php-application.md +++ b/src/cloud/project/magento-app-php-application.md @@ -43,14 +43,12 @@ For details about a specific PHP extension, see the [PHP Extension List](https:/ The following table shows the supported PHP extensions when deploying {{site.data.var.ee}} on the Cloud platform. -- **Required extensions** install automatically and cannot be removed. -- **Default extensions** install automatically. You can disable them as needed. -- **Optional extensions**–You can add these extensions as needed. - {:.php-plugins-table} -| Required extensions | Default extensions | Optional extensions | -|---------------------|---------------------|---------------------| -`ctype`
`curl`
`date`
`dom`
`fileinfo`
`filter`
`ftp`
`hash`
`iconv`
`json`
`mbstring`
`mysqlnd`
`openssl`
`pcre`
`pdo`
`pdo_sqlite`
`phar`
`posix`
`readline`
`session`
`sqlite3`
`tokenizer`
`xml`
`xmlreader`
`xmlwriter`
| `bcmath`
`bz2`
`calendar`
`exif`
`gd`
`gettext`
`intl`
`mysqli`
`pcntl`
`pdo_mysql`
`soap`
`sockets`
`sysvmsg`
`sysvsem`
`sysvshm`
`opcache`
`zip` |`geoip`
`gmp`
`igbinary`
`imagick`
`imap`
`ioncube`
`ldap`
`mailparse`
`mcrypt`
`msgpack`
`mysqli`
`oauth`
`pdo_mysql`
`propro`
`pspell`
`raphf`
`recode`
`redis`
`shmop` `sockets`
`sodium`
`ssh2`
`tidy`
`xdebug`
`xmlrpc`
`xsl`
`yaml`| +| Default extensions | Installed extensions
that cannot be uninstalled | Extensions that can be installed
and uninstalled as needed| +|--------------------|---------------------|---------------------| +| `bcmath`
`bz2`
`calendar`
`exif`
`gd`
`gettext`
`intl`
`mysqli`
`pcntl`
`pdo_mysql`
`soap`
`sockets`
`sysvmsg`
`sysvsem`
`sysvshm`
`opcache`
`zip` |`ctype`
`curl`
`date`
`dom`
`fileinfo`
`filter`
`ftp`
`hash`
`iconv`
`json`
`mbstring`
`mysqlnd`
`openssl`
`pcre`
`pdo`
`pdo_sqlite`
`phar`
`posix`
`readline`
`session`
`sqlite3`
`tokenizer`
`xml`
`xmlreader`
`xmlwriter`
|`geoip`
`gmp`
`igbinary`
`imagick`
`imap`
`ioncube`
`ldap`
`mailparse`
`mcrypt`
`msgpack`
`mysqli`
`oauth`
`pdo_mysql`
`propro`
`pspell`
`raphf`
`recode`
`redis`
`shmop` `sockets`
`sodium`
`ssh2`
`tidy`
`xdebug`
`xmlrpc`
`xsl`
`yaml`| + +The PHP module requirements for {{ site.data.var.ee }} are tied to the Magento version. See [PHP requirements]({{ site.baseurl }}/guides/v2.4/guides/v2.4/install-gde/prereq/php-settings.html). {:.bs-callout-warning} PHP compiled with debug is not supported and the Probe may conflict with XDebug or XHProf. Disable those extensions when enabling the Probe. The Probe conflicts with some PHP extensions like Pinba or IonCube. diff --git a/src/cloud/project/magento-app-php-ini.md b/src/cloud/project/magento-app-php-ini.md index 7f609f49f0d..14a56d61e0a 100644 --- a/src/cloud/project/magento-app-php-ini.md +++ b/src/cloud/project/magento-app-php-ini.md @@ -19,9 +19,11 @@ Configuring PHP settings improperly can cause issues. We recommend only advanced To increase the PHP memory limit, add the following setting to the php.ini file: ```php -memory_limit = 756M +memory_limit = 1G ``` +For debugging, increase the value to 2G. + ## Optimize realpath_cache configuration Set the following `realpath_cache` settings to improve Magento performance. diff --git a/src/guides/v2.3/config-guide/multi-site/ms_nginx.md b/src/guides/v2.3/config-guide/multi-site/ms_nginx.md index 4e07709bc57..652f19db3e7 100644 --- a/src/guides/v2.3/config-guide/multi-site/ms_nginx.md +++ b/src/guides/v2.3/config-guide/multi-site/ms_nginx.md @@ -196,7 +196,7 @@ To modify the `nginx.conf.sample` file: fastcgi_buffers 1024 4k; fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off"; - fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=18000"; + fastcgi_param PHP_VALUE "memory_limit=1G \n max_execution_time=18000"; fastcgi_read_timeout 600s; fastcgi_connect_timeout 600s; @@ -224,7 +224,7 @@ location ~ (index|get|static|report|404|503|health_check)\.php$ { fastcgi_buffers 1024 4k; fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off"; - fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=18000"; + fastcgi_param PHP_VALUE "memory_limit=1G \n max_execution_time=18000"; fastcgi_read_timeout 600s; fastcgi_connect_timeout 600s; diff --git a/src/guides/v2.4/install-gde/prereq/php-settings.md b/src/guides/v2.4/install-gde/prereq/php-settings.md index 8a33b0bb95d..d1e91a7032a 100644 --- a/src/guides/v2.4/install-gde/prereq/php-settings.md +++ b/src/guides/v2.4/install-gde/prereq/php-settings.md @@ -69,9 +69,9 @@ PHP Warning: date(): It is not safe to rely on the system's timezone settings. Our detailed recommendations are: - - Compiling code or deploying static assets, `756M` - - Installing and updating Magento components from Magento Marketplace, `2G` - - Testing, `~3-4G` + - Compiling code or deploying static assets, `1G` + - Debugging, `2G` + - Testing, `~3-4G` - Increase the values for the PHP `realpath_cache_size` and `realpath_cache_ttl` to recommended settings: @@ -146,7 +146,7 @@ To set PHP options: 1. Add the time zone setting you found in step 2. -1. Change the value of `memory_limit` to one of the values at the beginning of this section. +1. Change the value of `memory_limit` to one of the values recommended at the beginning of this section. For example, @@ -160,7 +160,7 @@ To set PHP options: ; ; Increase realpath cache size ; - realpath_cache_size = 1M + realpath_cache_size = 10M ; ; Increase realpath cache ttl diff --git a/src/guides/v2.4/install-gde/prereq/prereq-overview.md b/src/guides/v2.4/install-gde/prereq/prereq-overview.md index 588d79bee56..5cf2827b8b8 100644 --- a/src/guides/v2.4/install-gde/prereq/prereq-overview.md +++ b/src/guides/v2.4/install-gde/prereq/prereq-overview.md @@ -65,7 +65,7 @@ To install or upgrade Apache, see [Apache]({{page.baseurl}}/install-gde/prereq/a {% include install/php-versions-2.4.md %} -See [PHP][] for info on PHP requirements. +See [PHP]({{page.baseurl}}/install-gde/prereq/php-settings.html) for info on PHP requirements. ### MySQL @@ -134,13 +134,3 @@ curl -XGET 'localhost:9200' Next step [Choose how to install the Magento software]({{page.baseurl}}/install-gde/bk-install-guide.html) - -{:.ref-header} -Related topics - -* [MySQL]({{page.baseurl}}/install-gde/prereq/mysql.html) -* [Apache]({{page.baseurl}}/install-gde/prereq/apache.html) -* [PHP]({{page.baseurl}}/install-gde/prereq/php-settings.html) -* [Elasticsearch]({{page.baseurl}}/install-gde/prereq/elasticsearch.html) -* [Installing optional software]({{page.baseurl}}/install-gde/prereq/optional.html) -* [How to get the Magento software]({{ page.baseurl }}/install-gde/bk-install-guide.html) diff --git a/src/guides/v2.4/performance-best-practices/software.md b/src/guides/v2.4/performance-best-practices/software.md index 94e66637574..528314f52da 100644 --- a/src/guides/v2.4/performance-best-practices/software.md +++ b/src/guides/v2.4/performance-best-practices/software.md @@ -58,14 +58,16 @@ The presence of any profiling and debugging extensions can negatively impact the To guarantee successful execution of all Magento instances without dumping data or code to disk, set the memory limit as follows: -`memory_limit=768MB` +`memory_limit=1G` + +For debugging, increase this value to 2G. #### Realpath_cache configuration To improve Magento performance, add or update the following recommended `realpath_cache` settings in the `php.ini` file. This configuration allows PHP processes to cache paths to files instead of looking them up each time a page loads. See [Performance Tuning](https://www.php.net/manual/en/ini.core.php) in the PHP documentation. ```text -realpath_cache_size=1M +realpath_cache_size=10M realpath_cache_ttl=7200 ``` From 68b63c277f1b2274f4f24324c04de6458a75c3ba Mon Sep 17 00:00:00 2001 From: maeker12 <{ID}+{username}@users.noreply.github.com> Date: Mon, 28 Sep 2020 19:15:10 -0500 Subject: [PATCH 08/15] Added note about ext-sockets extension to required PHP extensions --- .../v2.4/install-gde/prereq/php-settings.md | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/guides/v2.4/install-gde/prereq/php-settings.md b/src/guides/v2.4/install-gde/prereq/php-settings.md index d1e91a7032a..1c7498eed81 100644 --- a/src/guides/v2.4/install-gde/prereq/php-settings.md +++ b/src/guides/v2.4/install-gde/prereq/php-settings.md @@ -41,18 +41,25 @@ Magento requires a set of extensions to be installed: {% include install/php-extensions-template.md %} -In the command line, type: +{:.bs-callout-warning} +If you install Magento via cloning from the [GitHub](https://github.com/magento/magento2) repository, then make sure you have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your instance. -```bash -php -m -``` +{:.procedure} +To verify installed extensions: -to see the list of installed modules. Verify that the listed extensions are installed. -If any modules are missing, they are added using the same workflow used for installing PHP. For example, if you use `yum` to install PHP, the PHP 7.4 modules can be added with: +1. At the command line, use the following command to list installed modules. -```bash - yum -y install php74u-pdo php74u-mysqlnd php74u-opcache php74u-xml php74u-gd php74u-devel php74u-mysql php74u-intl php74u-mbstring php74u-bcmath php74u-json php74u-iconv php74u-soap -``` + ```bash + php -m + ``` + +1. Verify that the extensions required by Magento are installed. + +1. Add any missing modules using the same workflow used for installing PHP. For example, if you use `yum` to install PHP, the PHP 7.4 modules can be added with: + + ```bash + yum -y install php74u-pdo php74u-mysqlnd php74u-opcache php74u-xml php74u-gd php74u-devel php74u-mysql php74u-intl php74u-mbstring php74u-bcmath php74u-json php74u-iconv php74u-soap + ``` {:.bs-callout-info} The `bcmath` extension is required for {{site.data.var.ee}} only. @@ -146,7 +153,7 @@ To set PHP options: 1. Add the time zone setting you found in step 2. -1. Change the value of `memory_limit` to one of the values recommended at the beginning of this section. +1. Change the value of `memory_limit` to one of the values recommendedat the beginning of this section. For example, From adadd7bc5ae42c3baa4295b2988e6132dc1563c2 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Mon, 28 Sep 2020 19:19:58 -0500 Subject: [PATCH 09/15] Apply suggestions from code review Co-authored-by: hguthrie --- src/cloud/project/magento-app-php-ini.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cloud/project/magento-app-php-ini.md b/src/cloud/project/magento-app-php-ini.md index 14a56d61e0a..36b286c9bb4 100644 --- a/src/cloud/project/magento-app-php-ini.md +++ b/src/cloud/project/magento-app-php-ini.md @@ -16,7 +16,7 @@ Configuring PHP settings improperly can cause issues. We recommend only advanced ## Increase PHP memory limit -To increase the PHP memory limit, add the following setting to the php.ini file: +To increase the PHP memory limit, add the following setting to the `php.ini` file: ```php memory_limit = 1G From 58d4955290bcc4d731b0755aedad17a3f7d90b55 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Mon, 28 Sep 2020 19:21:26 -0500 Subject: [PATCH 10/15] Update src/guides/v2.4/install-gde/prereq/php-settings.md --- src/guides/v2.4/install-gde/prereq/php-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.4/install-gde/prereq/php-settings.md b/src/guides/v2.4/install-gde/prereq/php-settings.md index 1c7498eed81..ce6cd8a428d 100644 --- a/src/guides/v2.4/install-gde/prereq/php-settings.md +++ b/src/guides/v2.4/install-gde/prereq/php-settings.md @@ -83,7 +83,7 @@ PHP Warning: date(): It is not safe to rely on the system's timezone settings. - Increase the values for the PHP `realpath_cache_size` and `realpath_cache_ttl` to recommended settings: ```conf - realpath_cache_size=1M + realpath_cache_size=10M realpath_cache_ttl=7200 ``` From 8fd265d93b9104241657c2c81ed27d54454cc06c Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Tue, 29 Sep 2020 08:39:02 -0500 Subject: [PATCH 11/15] Apply suggestions from code review Co-authored-by: Barny Shergold --- src/cloud/project/magento-app-php-ini.md | 2 +- src/guides/v2.4/install-gde/prereq/php-settings.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cloud/project/magento-app-php-ini.md b/src/cloud/project/magento-app-php-ini.md index 36b286c9bb4..bc4c3447056 100644 --- a/src/cloud/project/magento-app-php-ini.md +++ b/src/cloud/project/magento-app-php-ini.md @@ -32,7 +32,7 @@ Set the following `realpath_cache` settings to improve Magento performance. ; ; Increase realpath cache size ; -realpath_cache_size = 1M +realpath_cache_size = 10M ; ; Increase realpath cache ttl diff --git a/src/guides/v2.4/install-gde/prereq/php-settings.md b/src/guides/v2.4/install-gde/prereq/php-settings.md index ce6cd8a428d..b0c0fbb314f 100644 --- a/src/guides/v2.4/install-gde/prereq/php-settings.md +++ b/src/guides/v2.4/install-gde/prereq/php-settings.md @@ -58,7 +58,7 @@ To verify installed extensions: 1. Add any missing modules using the same workflow used for installing PHP. For example, if you use `yum` to install PHP, the PHP 7.4 modules can be added with: ```bash - yum -y install php74u-pdo php74u-mysqlnd php74u-opcache php74u-xml php74u-gd php74u-devel php74u-mysql php74u-intl php74u-mbstring php74u-bcmath php74u-json php74u-iconv php74u-soap + yum -y install php74u-pdo php74u-mysqlnd php74u-opcache php74u-xml php74u-gd php74u-devel php74u-mysql php74u-intl php74u-mbstring php74u-bcmath php74u-json php74u-iconv php74u-soap ``` {:.bs-callout-info} @@ -153,7 +153,7 @@ To set PHP options: 1. Add the time zone setting you found in step 2. -1. Change the value of `memory_limit` to one of the values recommendedat the beginning of this section. +1. Change the value of `memory_limit` to one of the values recommended at the beginning of this section. For example, From f2ae8e190932147e9d00517fac5c6b464b1d99f4 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Tue, 29 Sep 2020 09:23:11 -0500 Subject: [PATCH 12/15] Apply suggestions from code review Co-authored-by: Jeff Matthews --- src/guides/v2.4/install-gde/prereq/php-settings.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/guides/v2.4/install-gde/prereq/php-settings.md b/src/guides/v2.4/install-gde/prereq/php-settings.md index b0c0fbb314f..a56d8014e33 100644 --- a/src/guides/v2.4/install-gde/prereq/php-settings.md +++ b/src/guides/v2.4/install-gde/prereq/php-settings.md @@ -42,18 +42,18 @@ Magento requires a set of extensions to be installed: {% include install/php-extensions-template.md %} {:.bs-callout-warning} -If you install Magento via cloning from the [GitHub](https://github.com/magento/magento2) repository, then make sure you have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your instance. +If you install Magento by cloning the [magento/magento2](https://github.com/magento/magento2) GitHub repository, you must have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your system. {:.procedure} To verify installed extensions: -1. At the command line, use the following command to list installed modules. +1. List installed modules. ```bash php -m ``` -1. Verify that the extensions required by Magento are installed. +1. Verify that all required extensions are installed. 1. Add any missing modules using the same workflow used for installing PHP. For example, if you use `yum` to install PHP, the PHP 7.4 modules can be added with: From 019fbdf6902dea5f8ba96d42bf9debddd38d4008 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Tue, 29 Sep 2020 13:38:57 -0500 Subject: [PATCH 13/15] Update src/guides/v2.4/install-gde/prereq/php-settings.md --- src/guides/v2.4/install-gde/prereq/php-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.4/install-gde/prereq/php-settings.md b/src/guides/v2.4/install-gde/prereq/php-settings.md index a56d8014e33..06ec54078ea 100644 --- a/src/guides/v2.4/install-gde/prereq/php-settings.md +++ b/src/guides/v2.4/install-gde/prereq/php-settings.md @@ -42,7 +42,7 @@ Magento requires a set of extensions to be installed: {% include install/php-extensions-template.md %} {:.bs-callout-warning} -If you install Magento by cloning the [magento/magento2](https://github.com/magento/magento2) GitHub repository, you must have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your system. +If you install Magento 2.3 by cloning the [magento/magento2](https://github.com/magento/magento2) GitHub repository, you must have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your system. {:.procedure} To verify installed extensions: From adfb983844fed7ab7ad0f8ea067afa97026bf3e4 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Tue, 29 Sep 2020 14:44:50 -0500 Subject: [PATCH 14/15] Update src/guides/v2.4/install-gde/prereq/php-settings.md --- src/guides/v2.4/install-gde/prereq/php-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.4/install-gde/prereq/php-settings.md b/src/guides/v2.4/install-gde/prereq/php-settings.md index 06ec54078ea..c622004423d 100644 --- a/src/guides/v2.4/install-gde/prereq/php-settings.md +++ b/src/guides/v2.4/install-gde/prereq/php-settings.md @@ -42,7 +42,7 @@ Magento requires a set of extensions to be installed: {% include install/php-extensions-template.md %} {:.bs-callout-warning} -If you install Magento 2.3 by cloning the [magento/magento2](https://github.com/magento/magento2) GitHub repository, you must have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your system. +If you install Magento 2.3 by cloning the [magento/magento2](https://github.com/magento/magento2) GitHub repository, you must have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your system. The `ext-sockets` extension is required for Magento 2.4. {:.procedure} To verify installed extensions: From 77f9c4371dc7e6dc8fb44140b43347b83bc3a6b9 Mon Sep 17 00:00:00 2001 From: maeker12 <{ID}+{username}@users.noreply.github.com> Date: Tue, 29 Sep 2020 16:51:08 -0500 Subject: [PATCH 15/15] Fix broken link --- src/cloud/project/magento-app-php-application.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cloud/project/magento-app-php-application.md b/src/cloud/project/magento-app-php-application.md index 42b7a40a96d..bb5dd4c8fa3 100644 --- a/src/cloud/project/magento-app-php-application.md +++ b/src/cloud/project/magento-app-php-application.md @@ -48,7 +48,7 @@ The following table shows the supported PHP extensions when deploying {{site.dat |--------------------|---------------------|---------------------| | `bcmath`
`bz2`
`calendar`
`exif`
`gd`
`gettext`
`intl`
`mysqli`
`pcntl`
`pdo_mysql`
`soap`
`sockets`
`sysvmsg`
`sysvsem`
`sysvshm`
`opcache`
`zip` |`ctype`
`curl`
`date`
`dom`
`fileinfo`
`filter`
`ftp`
`hash`
`iconv`
`json`
`mbstring`
`mysqlnd`
`openssl`
`pcre`
`pdo`
`pdo_sqlite`
`phar`
`posix`
`readline`
`session`
`sqlite3`
`tokenizer`
`xml`
`xmlreader`
`xmlwriter`
|`geoip`
`gmp`
`igbinary`
`imagick`
`imap`
`ioncube`
`ldap`
`mailparse`
`mcrypt`
`msgpack`
`mysqli`
`oauth`
`pdo_mysql`
`propro`
`pspell`
`raphf`
`recode`
`redis`
`shmop` `sockets`
`sodium`
`ssh2`
`tidy`
`xdebug`
`xmlrpc`
`xsl`
`yaml`| -The PHP module requirements for {{ site.data.var.ee }} are tied to the Magento version. See [PHP requirements]({{ site.baseurl }}/guides/v2.4/guides/v2.4/install-gde/prereq/php-settings.html). +The PHP module requirements for {{ site.data.var.ee }} are tied to the Magento version. See [PHP requirements]({{ site.baseurl }}/guides/v2.4/install-gde/prereq/php-settings.html). {:.bs-callout-warning} PHP compiled with debug is not supported and the Probe may conflict with XDebug or XHProf. Disable those extensions when enabling the Probe. The Probe conflicts with some PHP extensions like Pinba or IonCube.