Kohana MVC Framework on Google App Engine … or not

Feeling inspired from getting PHP to work on the Google App Engine, I decided to try to see if I can get the Kohana MVC framework to run on top GAE as well. The process is pretty simple: just copy the framework files to the project’s ‘war’ folder.

I tried to install the latest version which at the time of this writing was As it turned out, the latest version of Kohana requires PHP 5.2.3 or newer, but the version that Quercus PHP ships with is 5.2.0. Another issue seems to be that the Quercus PHP does not have Filters enabled.

I then removed the install.php file and got a “Fatal Error: ‘Kohana’ is an unknown class.” After looking around a bit, it started to dawn on me that there might be a naming conflict. Seems like some part of the Java system is assuming that the next part of the path ‘system/classes/’ ¬†should be a class. Unfortunately, Kohana is trying to call system/classes/kohana/core.php

The next step was to try to run Kohana 2.3.4 because that version has a different file structure – no folders called ‘classes’

Sadly, the situation did not improve. Although the install.php was happy with the version of PHP, when I tried to run index.php I got this:

com.caucho.quercus.QuercusException: com.caucho.quercus.QuercusException: com.caucho.quercus.lib.reflection.ReflectionMethod.isPrivate: `isPrivate()’ has not been implemented.

So…I guess Quercus PHP is not quite there yet as far as Kohana is concerned.

3 Comments to “Kohana MVC Framework on Google App Engine … or not”

  1. By Emily, June 1, 2010 @ 2:03 am

    Interesting… I was about to try this as well. Maybe you’d like to give Codeigniter’s a shot too?

  2. By Edel SM, September 7, 2010 @ 8:23 am

    tried codeigniter 1.7.2 on quercus 4.0.8. however, i can only successfully load index.php from the browser. could not get url mapping (?) to work, so http://site/controller/action returns 404, while http://site/index.php loads successfully.

  3. By Deejay, February 21, 2011 @ 7:54 am

    The reason this doesn’t work isn’t down to any Java classloading issues – it’s because Quercus loads classes differently to regular PHP. PHP normally loads in a whole file (includes and all), then evaluates it. Quercus evaluates class definitions as it encounters them.

    Kohana_Core is the base class, and Kohana extends it. Unfortunately Kohana_Core is riddled with references to Kohana (which coincidentally is some of the ost shockingly poor OO design I have ever seen), which doesn’t exist yet.

    You can test this yourself by changing all the static references from Kohana:: to Kohana_Core::, but this didn’t solve all my problems – I had issues later down the line.

    It’s a shame that Quercus doesn’t actually work reliably, as otherwise it would have been quite a promising technology.

RSS feed for comments on this post. TrackBack URI

Leave a Reply