Technology Blog

Partners

WhichIsBest

Ads

ads
WhichIsBest

Saturday, October 12, 2013

Google app engine php tutorial in windows. Getting started hello worldexample. GAE development and deployment




Google App Engine (GAE) is a platform as a service (PaaS) cloud computing platform for developing and hosting web applications. Recently Google has made Google App Engine PHP runtime support fully available to the general public, meaning you can run your PHP applications in the Google Cloud Infrastructure with various pricing plans.

I've never used App Engine before and thought of give it a try. I thought I might have to put a lot of workaround for setup and deployment of the project. But I am really impressed by its simplicity of creation and deployment of the project. Also they provide a simple GUI called Google App Engine Launcher for making the application management simpler.

Lets get started,

Creating the Application

1. Go to http://www.python.org/getit/releases/2.7.4/ and download the Python MSI installer for windows and install the application.


2. Then download the PHP SDK for App Engine from the link  http://googleappengine.googlecode.com/files/GoogleAppEngine-1.8.5.msi and install the application.
3. After Installing Python and App Engine PHP SDK, Open the Google App Engine Launcher application,

4. Go to menu bar and click  File -> Create New Application,

5. Fill up the Application Name, Parent Directory, Runtime (PHP), Port and Admin Port.

6. The application will be created and listed out in the GAE launcher.

7. Open the Parent Directory in Explorer, You can see the application folder got created.

8. The new empty application folder will have app.yaml file, main.php file and a favicon.ico file.

9. The app.yaml file will have the application configurations, and by default it is configured in a way that main.php will handle all the requests coming into the application. We'll see the configuration options later and run the application first.

10. Now open Google App Engine Launcher Click Run button given above (Control -> Run),


11. Now goto http://localhost:8080 or to whatever port you have given. You can see the "Hello World!" over there.

If the application is not starting goto Edit -> Preferences, and fill up the required details.

It is said that the default values will be used if it is not set. But for me, Unless I set it manually, The application was not running. Try with the above details. If it is still not running, Try adding the Deployment Server value with "C:Program FilesGooglegoogle_appenginedev_appserver.py" in the preference and try again.

The given demo is done in Windows 8 machine. But when I tried with Windows XP, I've got the error message "The procedure entry point InitializeSRWLock could not be located in the dynamic link library KERNEL32.dll" and I couldn't resolve it though.

Deploying application to Google App Engine
12. Go to https://appengine.google.com/ , Login with your Google account and Click create application.

13. Fill up the Application ID, Title and leave the other options to default and Click Create Application.

14. After creation, You can see a dashboard for the application. Lets not get complicated and start with deploying the application.

15. Now lets create an application to deploy to App Engine, Or you can use your old application itself. Make sure to change the "application:" in the app.yaml with the Application Identifier you've registered with Google App Engine.

16. Select the application and click the Deploy button ( Control -> Deploy )
Fill up your google account credentials and Click Ok.
17. The below window will be opened and the application will be deployed to the Google App Engine.
18. After the deployment is successful, Go to http://<your-app-id>.appspot.com, in the current scenario it is http://tinywall-app.appspot.com/

Bazinga!! Your PHP application is running in Google App Engine Cloud Infrastructure.

I'll explore what else we can do with PHP in Google App Engine and will blog in the upcoming posts.

19 comments:

  1. Thanks for the post, it's very helpful.

    ReplyDelete
  2. The Google tutorial neglected to explain that the preferences really needed to be set for things to work, they really weren't even though it appeared as though they were! I drove myself nuts trying to figure out my mistake but I didn't have one! I was about to give up until I found this, Thank you!

    ReplyDelete
  3. Do you know who is responsible fro development human whose mind is superb a great advanced methodology is responsible fro such applications, that is why companies hire PHP developer

    ReplyDelete
  4. Awesome post. Really you are shared very informative concept... Thank you for
    sharing. Keep on updating...
    Best selenium Training Institute in Chennai | Best selenium Training Institute in Tnagar

    ReplyDelete
  5. Excellent information...It was getting more information about your blog. Thanks for sharing, keep updating.
    Java Project Center in Chennai | Java Project in Chromepet

    ReplyDelete
  6. Post is very informative… It helped me with great information so I really believe you will do much better in the future.
    MSC Final Year Project Center in Chennai | BSC Training in Guindy

    ReplyDelete
  7. Post is very informative… It helped me with great information so I really believe you will do much better in the future.
    PHP Final Year Project Center in Chennai | PHP Project in Chromepet

    ReplyDelete
  8. I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
    Android Final Year Project Center in Chennai | Android Project Center in Perungudi

    ReplyDelete
  9. Really I enjoy this blog….. Very nice post… Thanks for sharing and keep updating..
    BE Final Year Project Center in Chennai | BE Project Center in Chromepet

    ReplyDelete
  10. Your Blog is nice and informative..Thanks for sharing this valuable information with us..I am visiting this website regularly, this web site sharing nice thoughts

    Best MATLAB Training Academy in Kanchipuram

    ReplyDelete
  11. Thanks for this grateful information. all this information is very important to all the users and can be used good at all this process.


    Best Web Designing Training Academy in Kanchipuram

    ReplyDelete
  12. It was an excellent and amazing blog post.... Thanks for sharing you blog articles with us ...we have leading projects Best cloud computing ipt training in chennai and we provide best titles for your projects .......

    ReplyDelete

WhichIsBest
WhichIsBest