Getting started with Quercus in Google App Engine

Posted on by admin

Last year an article was written on a blog about how to run PHP on Google App Engine (GAE).

The guide came with a pre-made package to get you started.

However, Quercus has been updated since this was produced.

Unfortunately the official Quercus website has very little detail to help us get started…

Further research lead me to a blog post by the company that makes Quercus entitled: Quercus on the Google App Engine

It gives a general overview of what is required, but isn’t really very direct.

I did also find an entry on their wiki for Quercus on Google App Engine, which was more useful.

Here’s what you need to do:

  1. Follow the Google App Engine: Creating a Project getting started guide to create your file structure and the xml files.
  2. Download the latest version of Resin (ie: resin-4.0.6.zip)
  3. From the zip, copy lib/resin.jar to your WEB-INF/lib
  4. Add GoogleQuercusServlet as a standard servlet and any params to web.xml (example web.xml)
  5. Put your PHP files in your “war” directory.
  6. Use the AppEngine Java SDK appcfg to update.

If you get this error:

java.lang.IllegalStateException: Found a jar file too large to upload: “…\WEB-INF\lib\resin.jar”. Consider using –enable_jar_splitting.

Using the suggested option fixed this, which looks like this:

C:\appengine-java-sdk\bin\appcfg.cmd –enable_jar_splitting update war

That’s pretty much it to get you started, when you visit your app address, you should be able to call your PHP files.

If you are looking for something a bit more advanced, take a look at these articles that explain how to get WordPress working:

For additional help I recommend you visit Caucho’s Quercus Forums.

Using Quercus® to Run the WordPress PHP blog on Google App EngineUsing Quercus® to Run the WordPress PHP blog on Google App Engine

Related posts:

  1. Does registering a domain for a longer term increase your search engine rankings? Recently I come across a claim by Network Solutions stating:...
  2. The Google Translate recursion bug Recently I found a bug in Google Translate. It’s not...
  3. 10 wordpress performance optimisation tips I wanted to prepare my wordpress powered blog for an...
  4. Google AdSense won’t let me in! Back in 2004, I signed up my old site “hm2k.org”...
  5. Is Google PageRank dead? PageRank is dead, long live PageRank. As we said recently,...

About admin

The author formerly known as HM2K is now the Phurix Labs administrator.

This entry was posted in Development and tagged , , , , . Bookmark the permalink.

5 Responses to Getting started with Quercus in Google App Engine

  1. hm2k says:

    I did discover a bug with WWW-Authenticate.

    See: http://bugs.caucho.com/view.php?id=4000

  2. Lim Chee Kin says:

    Hi,

    Thanks for your kindness of sharing and helpful blog post.

    I follow all steps listed by you, but couldn’t make it works.

    Please find the complete project zip file here:
    http://rapidshare.com/files/384216685/grails-php.zip.html

    FYI, I am using App Engine Java SDK 1.3.3.1 (latest version)

    Did I missed any important step? Please advice.

    Thank you.

  3. hm2k says:

    They fixed my bug :)

    Steps to upgrade are simple…

    #Download latest quercus
    wget -O /tmp/quercus.war.zip http://www.caucho.com/download/quercus-4.0.7.war
    #Extract files from archive
    unzip /tmp/quercus.war.zip -d /tmp/quercus
    #Remove existing resin.jar
    rm -f war/WEB-INF/lib/resin.jar
    #Copy latest resin.jar
    cp -f /tmp/quercus/WEB-INF/lib/resin.jar war/WEB-INF/lib/resin.jar
    #Cleanup
    rm -fr /tmp/quercus
    rm -f /tmp/quercus.war.zip
    #Done
    echo "done!"

  4. Marcus Uy says:

    Do you know if the WWW-Authenticate bug has been fixed yet, and if so in which version of Resin? I’ve tried both the latest community versions of 3 and 4 and it doesn’t seem to be fixed yet. Pretty big “bug” to be going unnoticed.

  5. If you want to easy to deploy PHP installation on Google clouds, I strongly suggest to use package found from http://php-apps.appspot.com

    Site is made with PHP on Google App Engine itself. Im trying to find Google account login script to use on sites at the moment. Anyone want to suggest?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>