You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Magento uses cron for two sets of tasks, and for each, cron can be run with a different configuration:
4
+
Magento uses cron for two sets of tasks, and for each, cron can run with a different configuration:
5
5
6
-
* The general cron job that reindexes indexers, generates e-mails, generates the sitemap, and so on, typically runs as the PHP command-line user's `php.ini`
7
-
* Two other cron jobs are used by the <ahref="{{page.baseurl}}comp-mgr/bk-compman-upgrade-guide.html">Component Manager and System Upgrade utilities</a>. Those commands must use the web server's `php.ini`.
6
+
* PHP command-line configuration: The general cron job that reindexes indexers, generates e-mails, generates the sitemap, and so on.
7
+
8
+
You can find the command-line configuration using the command `php --ini`.
9
+
* Web server PHP plug-in configuration: Two other cron jobs are used by the <ahref="{{page.baseurl}}comp-mgr/bk-compman-upgrade-guide.html">Component Manager and System Upgrade utilities</a>.
10
+
11
+
You can find the web server plug-in configuration using <a href="{{ page.baseurl }}install-gde/prereq/optional.html#install-optional-phpinfo"><code>phpinfo.php</code>.
12
+
13
+
<divclass="bs-callout bs-callout-warning">
14
+
<p>To avoid issues during installation and upgrade, we strongly recommend you apply the same PHP settings to both the PHP command-line configuration and to the PHP web server plug-in's configuration. For more information, see the instructions in either the <a href="{{ page.baseurl }}install-gde/prereq/php-ubuntu.html#instgde-prereq-timezone">Ubuntu</a> or <a href="{{ page.baseurl }}install-gde/prereq/php-ubuntu.html#instgde-prereq-timezone">CentOS</a> PHP topics.</p>
15
+
</div>
8
16
9
17
If you're not experienced with running cron, you can run all commands with the web server's configuration; however, we leave the decision up to you.
10
18
11
19
#### Find the web server configuration
12
-
13
20
To find the web server configuration, run a <ahref="{{page.baseurl}}install-gde/prereq/optional.html#install-optional-phpinfo">`phpinfo.php` file</a> in your web browser and look for the Loaded Configuration File as follows:
*`<path_to_binary>` is the absolute file system path to your PHP binary
45
-
*`<ini_file_path>` is the path to a `php.ini` file to use for the cron job
51
+
*`<path to php binary>` is the absolute file system path to your PHP binary
52
+
*`<magento install dir>` is the directory in which you installed the Magento software; for example, `/var/www`
46
53
*`| grep -v "Ran jobs by schedule"` filters this message from the log, making any errors easier to spot
47
54
48
55
The first command (`magento cron:run`) reindexes indexers, send automated e-mails, generates the sitemap, and so on. Usually it's associated with the PHP command line `.ini` file. The other two commands are used by the Component Manager and System Upgrade.
49
56
50
-
For example, if the PHP binary is located in `/usr/bin`, you installed Magento in `/var/www/html/magento2`, and all commands use the web server's `/etc/php5/apache2/php.ini`, enter
57
+
For example, if the PHP binary is located in `/usr/bin`, you installed Magento in `/var/www/html/magento2`, enter
51
58
52
59
Example:
53
60
54
-
* * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
Copy file name to clipboardExpand all lines: _includes/install/php-config.html
+24-12Lines changed: 24 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -23,19 +23,30 @@
23
23
24
24
`asp_tags` will be removed in PHP 7.
25
25
26
-
To set PHP options:
26
+
<divclass="bs-callout bs-callout-warning">
27
+
<p>To avoid issues during installation and upgrade, we strongly recommend you apply the same PHP settings to both the PHP command-line configuration and to the PHP web server plug-in's configuration. For more information, see the next section.</p>
28
+
</div>
29
+
30
+
### Find PHP configuration files
31
+
To find the web server configuration, run a <ahref="{{page.baseurl}}install-gde/prereq/optional.html#install-optional-phpinfo">`phpinfo.php` file</a> in your web browser and look for the Loaded Configuration File as follows:
0 commit comments