Gareth McCumskey
Gareth McCumskey

Reputation: 1540

Google App Engine PHP SDK returning error on helloworld script

I am currently trying out the Google App Engine for PHP on my local development environment. So far, I have been following the instructions at https://developers.google.com/appengine/docs/php/gettingstarted/helloworld in order to just test out a small app to get used to how the SDK works. However, when I get to the point of loading the test web server using the SDK, I get an error trying to load the very basic helloworld.php example. The command I currently run is:

../GoogleAppEngineSDK/google_appengine/dev_appserver.py --php_executable_path=/usr/bin/php --port=9999 helloworld/

As you can see I use a custom port to avoid conflict with another application that runs on the default 8080. The SDK engine loads fine, but as soon as I try to access my application under localhost:9999 I get the error:

AssertionError("invalid CGI response: ''",)

and the web page itself throws a 500 error.

So far my attempts to correct the problem have yielded nothing and was wondering if there may be something I am missing.

Upvotes: 3

Views: 1431

Answers (2)

Andrew J
Andrew J

Reputation: 2001

You should make sure you're pointing to the php-cgi executable not php. Not every OS comes with this so you may need to install it. The getting started guide has more detailed instructions.

Upvotes: 9

thordiesel
thordiesel

Reputation: 101

Just had this issue. Changing my php_executable_path to /opt/local/bin/php-cgi54 did the trick.

Upvotes: 3

Related Questions