The preferred tooling for managing your App Engine applications in
PHP is
Google Cloud SDK. Cloud SDK includes a
local development server as well as the
gcloudcommand-line
tooling for deploying and managing your apps.
By downloading, you agree to be bound by the Terms that govern use of all SDKs for App
Engine.
Installing Cloud SDK for PHP
Install Google Cloud SDK along with the corresponding gcloud component and other related
tools and dependencies.
Run the following command to update all the installed Google Cloud SDK
components, including the App Engine extension for PHP:
gcloud components update
If you have previously used the original App Engine SDK and need to continue
to use the appcfg command,
you can instead download and install the original App Engine SDK by following
the instructions below. Cloud SDK does not include the
appcfg command.
Download and install the original App Engine SDK for PHP.
To install the original local development server and the
appcfg tooling, you can install the original App Engine
SDK for PHP.
Optional: Download and install the original App Engine SDK for PHP
Make sure Python 2.7 is installed on your machine using the
following command:
/usr/bin/env python -V
The output should look like this:
Python 2.7.[NUMBER]. If Python 2.7 isn't
installed, install it now using the installation
instructions for your Linux distribution.
Build and install the
PHP interpreter. On Debian-based Linux systems, you
can use the following command:
sudo apt-get install php5-cgi
Or, alternatively, if you're using Redhat, use the following
command:
In the Finder, click Go > Applications to open the
Applications folder.
Double click the
GoogleAppEngineLauncher-1.9.83.dmg
file that you downloaded to open it, then drag the
GoogleAppEngineLauncher icon over to the Applications
folder.
Double-click GoogleAppEngineLauncher in the
Application folder.
When prompted to Make command symlinks, click
OK. The symlinks allow you to run important SDK
command-line tools in any terminal window.
Important: The GoogleAppEngineLauncher
is a convenient UI-based tool for running and deploying
App Engine apps, but it does not provide all the
features you'll need. You can use the equivalent
gcloud
command-line tool, for many of the tasks that you'll want
to perform.
Notice that the installation process above unpacks the
contents of the App Engine SDK at the location:
/usr/local/google_appengine
The App Engine PHP SDK requires Python 2.7, which is
installed by default on Mac OS X 10.6 (Snow Leopard) or
later. Verify your Mac's Python installation using the
following command:
/usr/bin/env python -V
If the output looks like Python 2.7.[NUMBER],
then you already have the correct Python version
installed. Otherwise you can install Python 2.7 from the
Python web site.
Most PHP apps use a MySQL backend, which is not packaged
with the App Engine SDK. To setup MySQL, visit the
MySQL Downloads page
; the "Community Server" edition will suffice for your
local development.
Double-click the
GoogleAppEngine-1.9.83.msi
and follow the prompts to install the SDK.
The
Local Development Server of the App Engine PHP SDK is a
Python application and requires a Python 2.7.x version, but
nothing higher. See the Python web site for download
information: Python
2.7.5.
Note: The PHP SDK includes binaries for the PHP 5.5
runtime, including all
enabled extensions, so there is no need to download
PHP separately for the purposes of developing with App
Engine -- you just need Python.
Most PHP apps use a MySQL backend, which is not packaged
with the App Engine SDK. To set up MySQL, see the
MySQL Downloads page
; the "Community Server" edition will suffice for your
local development.