Run, debug, and upload an application to Google App Engine for PHP
IntelliJ IDEA provides the possibility to run and debug your applications locally on the PHP Development Server before uploading them to the Google PHP Runtime Environment. Applications are launched locally according to a dedicated App Engine for PHP run/debug configuration.
In this section:
Working with the app.yaml file
A Google App Engine PHP application is configured in the app.yaml file. If you generate a project stub (see Develop a Google App for PHP application), the app.yaml file is created automatically. If you activate Google App Engine support in an existing project, you need to create an app.yaml file manually. In either case, make sure the
runtime property is set to
php55, because the Google App Engine for PHP SDK contains a built-in PHP 5.5 interpreter.
Creating a run configuration of the type App Engine for PHP
On the main menu, go to App Engine for PHP from the list. The App Engine for PHP opens., click and select
Specify the host to run the development server and the application on (the default is localhost).
Specify the port through which IntelliJ IDEA will communicate with the development server (the default port is 8080).
Optionally in the Command Line area, specify the settings for running and debugging your application on the PHP development server in the command-line mode:
In the Interpreter options field, specify the options to be passed to the PHP executable file of the built-in PHP interpreter, see Command-Line Arguments for details.
In the Custom working directory field, specify the location of the files that are outside the folder with your sources and are referenced through relative paths. Type the path manually or click Browse and select the desired folder in the dialog that opens.
In the Yaml files field, specify the .yaml configuration files to use. This field is optional, use it when your application consists of several modules and therefore several .yaml configuration files are used.
In the Environment variables field, In this field, specify the environment variables be passed to the built-in server. See Environment Variables in Apache for details.
Running an application on the PHP development server
Create an App Engine for PHP run configuration as described above.
Choose the configuration from the list and click on the toolbar.
View and analyze the output of the application in console of the Run tool window.
To view the application execution results, open your browser at http://localhost:8080.
Debugging an application on the PHP development server
Uploading an application to the Google PHP runtime environmentAfter you have tested your application by running and debugging it locally on the development server, you can deploy it to the Google PHP Runtime Environment.
From the main menu, select.
Visit the application at http://<your-application-id>.appspot.com/.