IntelliJ IDEA 2016.3 Help

Preparing to Develop a Google App for PHP Application

IntelliJ IDEA takes care of creating the specific directory structure and settings. IntelliJ IDEA 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. Install and enable the Google App Engine Support for PHP plugin. The plugin is not bundled with IntelliJ IDEA, but it can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling 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. Choose File | New | Project on the main menu or click the New Project button on the Welcome screen.
  2. In the Project Category and Options dialog, which is the first page of the New Project wizard, choose PHP in the left-hand pane.
  3. In the right-hand pane, choose App Engine Project and click Next.
  4. On the second page of the wizard, specify the following:
    1. The name of the project and the folder to create it in.
    2. The version of the template to use.
    3. In the Application ID text box, type the identifier of your application as you specified it on the Create application page.
    4. In the SDK directory test box,
    5. The location of the Python executable file. Type the path manually in the Python executable text box or click the Browse button /help/img/idea/2016.3/browseButton.png and choose the Python executable in the dialog box that opens.
    Click Finish when ready.

IntelliJ IDEA 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 value true 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. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or IntelliJ IDEA | Preferences for OS X. Expand the Languages&Frameworks node, and then click Google App Engine for PHP under PHP.
  2. On the Google App Engine for PHP page that opens, select the Enable Google App Engine for PHP support check box 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 check box.
      • Log in with email and password: choose this option to use your Gmail address and password.

See Also

Last modified: 29 November 2016