layout | group | subgroup | title | menu_title | menu_order | menu_node | level3_menu_node | level3_subgroup | version | github_link |
---|---|---|---|---|---|---|---|---|---|---|
default |
cloud |
08_setup |
Step 5, Set up PHP and MySQL |
Step 5, Set up PHP and MySQL |
20 |
level3child |
workspace |
2.0 |
cloud/before/before-workspace-php.md |
When you're working with the Magento Cloud CLI, local environment settings come from the machine on which you're working, not from Magento Enterprise Cloud Edition. For example, certain things (like debugging) require a larger PHP memory_limit
than most PHP distributions provide by default.
{% collapsible To set memory_limit
: %}
Before working with your Magento Enterprise Cloud Edition project, make sure you set the PHP memory_limit
to at least 1G
for normal use or at least 2G
for debugging.
-
Find your
php.ini
file using the following command:php --ini
Use the value of
Loaded Configuration File
. -
Open
php.ini
in a text editor. -
Change the value of
memory_limit
to at least1G
for normal use or at least2G
for debugging. -
Save your changes to
php.ini
and exit the text editor. -
Restart your web server:
-
Apache
- CentOS:
service httpd restart
- Ubuntu:
service apache2 restart
- CentOS:
-
nginx:
service nginx restart
-
{% endcollapsible %}
The MySQL configuration parameter auto_increment_increment
{:target="_blank"} is set to 1
by default in a local MySQL installation but the Magento Enterprise Cloud Edition cluster uses a value of 3
.
To avoid issues, we recommend you set auto_increment_increment=3
.
{% collapsible To view and set auto_increment_increment
: %}
First, view the current value:
mysqladmin variables -u <root user name> -p | grep 'auto_increment'
If necessary, set auto_increment_increment
to 3:
-
As a user with
root
privileges, open/etc/my.cnf
in a text editor. -
Add or edit the following line in the
[mysqld]
section:auto_increment_increment=3
-
Restart MySQL:
service mysqld restart
{% endcollapsible %}
- If the Magento software isn't installed in a Cloud environment, see [create a new project from a template]({{ page.baseurl }}cloud/access-acct/first-time-setup_template.html) or [import an existing project]({{ page.baseurl }}cloud/access-acct/first-time-setup_import.html)
- Otherwise, see [Set up an environment and install the Magento software locally]({{ page.baseurl }}cloud/access-acct/set-up-env.html)