PhpStorm 2023.2 Help

Develop a Google App for PHP application

PhpStorm takes care of creating the specific directory structure and settings. PhpStorm can either generate a Google App Engine for PHP-specific project stub or you can enable support of Google App Engine for PHP in an existing project.

Before you start

  1. Download and install Python, version 2.7.

  2. Download and install the Google App Engine for PHP.

  3. Make sure the Google App Engine Support for PHP bundled plugin is enabled in the Installed tab of the Settings | Plugins page as described in Install plugins.

  4. Create a Google account at http://www.google.com.

  5. Create an application on the Create application page of the Google App Engine and remember its application ID, you will have to specify it during the creation of a project.

Creating a project stub of a Google App Engine for PHP application

  1. Click Create New Project on the Welcome screen or select File | New | Project from the main menu. The New Project dialog opens.

  2. In the Create New Project dialog that opens, specify the name of the project and the folder where the project will be located. From the Project Type list, choose App Engine Project and click OK.

  3. In the right-hand pane, specify the following:

    • In the Application ID field, type the identifier of your application as you specified it on the Create application page.

    • In the SDK directory field, specify the path to the folder where the Google App Engine SDK for PHP is installed.

    • The location of the Python executable file. Type the path manually in the Python executable field or click Browse the Browse button and choose the Python executable in the dialog that opens.

PhpStorm creates a project with the main.php file and the app.yaml configuration file. The app.yaml file contains the generated settings for the runtime (should be php55), the api_version, the applicationID, the application version (by default is 1), the threadsafe element with the true value to enable sending multiple, parallel requests, and the Script handlers url and script (with the value main.php).

Activating the Google App Engine support in an existing project

  1. In the Settings dialog (Control+Alt+S), go to PHP | Google App Engine for PHP.

  2. On the Google App Engine for PHP page that opens, select the Enable Google App Engine for PHP support checkbox and specify the following:

    1. The folder where the Google App Engine for PHP SDK is stored.

    2. The path to the Python 2.7 executable file.

    3. In the App Engine Account Settings area, choose the way to authenticate to the development server, the available options are:

      • Use passwordless login via OAuth2: choose this option to use the OAuth 2.0 protocol. To save the token achieved through the Google Developers Console, clear the Do not save token checkbox.

      • Log in with email and password: choose this option to use your Gmail address and password.

Last modified: 26 June 2023