PHP on Google Apps Engine
How to run PHP on Google Apps Engine
This guide will show you how to use the PHP language on Google Apps Engine using Java.
You can host a project for free on Apps Engine with 500mb storage limit and about 5 million page views per month. If your app however needs more.
You probably know that Apps Engine doesn’t support PHP but supports Java and Python. The support of PHP still remains the most wanted feature on App Engine. In order to run a PHP app on App engine we will use Quercus.
Quercus is a fast, open-source Java implementation of the PHP language which actually runs faster than regular PHP.
Before you upload an app, consider that there is no way of deleting an application from App Engine and you are limited to register up to 10 different applications per Google Account..
1.
Start by registering a free Google account.
2.
Download and install the Java SE Development Kit (JDK).
3.
Grab the App Engine Java SDK and extract it to a suitable location (eg. C:\appengine-java-sdk ). Make sure you don’t download the Python version which will appear at the top of the download page.
4.
Register a new application by clicking the “Create an application” on the App Engine homepage.
5.
Grab and unzip this file (phpwithjava.rar) (originally from webdigi.co.uk) to a suitable location (eg. C:\phpwithjava).
6.
Start a code editor and open C:\phpwithjava\war\WEB-INF\appengine-web.xml
7.
Change the value myfirstapp on line 3 to the name of the application you registered on the App Engine homepage. Line 3: myfirstapp
8.
Make additional changes to the html and php files in C:\phpwithjava\war.
9.
Start a new command line. Navigate to you the App Engine Java SDK binary folder. Cd C:\appengine-java-sdk\bin
11.
To upload your first app typing appcfg.cmd update C:\phpwithjava\war .
12.
Go to your web browser and navigate to appname.appspot.com.
