Slim Framework on Google App Engine

Today I launched my first production app on Google App Engine (GAE). I ran into a few headaches along the way, but thanks to the local dev tools, it wasn’t nearly as bad as it could have been.

The first headache was that one of the packages I was using utilized Guzzle 3 which requires the cURL extension. It’s not there. I had to fork and fix the package.

Here’s the tips I figured out for using the Slim Framework.

1. Add the following because Slim requires it without testing if it exists.

2. If you aren’t using your own log writer, the default one uses php://stderr. According to the GAE docs, it appears that this shouldn’t be a problem. Not so. I used the following dummy to just throw the messages through error_log(). Somewhere along my fruitless search for answers, I found out those don’t output to the same place.

With those two tweaks, Slim seems to be working well.

4 thoughts on “Slim Framework on Google App Engine”

  1. I tried adding the above code to my GAE deployment of Slim Framework on PHP5.5 and I get a Slim Application Error. Any thoughts?

    require_once '../include/DummyLogWriter.php';
    $app = new \Slim\Slim([
    'log.writer' => new DummyLogWriter()

    // Work around for Slim on GAE
    if(!isset($_SERVER['SERVER_PORT'])) $_SERVER['SERVER_PORT'] = 443;


    Leo Reply:

    I haven’t tried 5.5 yet. I hope to soon.


Leave a Reply

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