I'm trying to run a sample php script on Google App Engine locally.
On Installing the PHP SDK on Linux Google Developer Docs, I skipped installing PHP since I already have it on my Ubuntu system by previously installing it as sudo apt-get install php5 and php 5-*. My php-cgi is at /usr/bin/php-cgi
python google_appengine/dev_appserver.py --php_executable_path=/usr/bin/php-cgi Dropbox/webapps/helloworld/
INFO 2013-05-18 14:10:06,849 sdk_update_checker.py:244] Checking for updates to the SDK.
INFO 2013-05-18 14:10:10,024 sdk_update_checker.py:260] Update check failed: HTTP Error 404: Not Found
WARNING 2013-05-18 14:10:10,554 simple_search_stub.py:962] Could not read search indexes from /tmp/appengine.helloworld.epqrs-mango/search_indexes
INFO 2013-05-18 14:10:10,557 api_server.py:153] Starting API server at: http://localhost:42925
INFO 2013-05-18 14:10:10,590 dispatcher.py:164] Starting server "default" running at: http://localhost:8080
INFO 2013-05-18 14:10:10,592 admin_server.py:117] Starting admin server at: http://localhost:8000
ERROR 2013-05-18 14:10:10,915 php_runtime.py:199] The PHP runtime is not available because: The PHP runtime cannot be run with the "Memcache" PECL extension installed
So what could possibly be the reason for error ? Is it not possible to run this along with the existing PHP setup ?
You will have to disable memcache's extensions with your php setup.
Run command:
php --ini
You will get a list of extensions.
Open up memcache's ini files like:
/etc/php.d/memcache.ini
/etc/php.d/memcached.ini
Disable the memcache module:
; extension=memcache.so
; extension=memcached.so
ERROR 2013-05-18 14:10:10,915 php_runtime.py:199] The PHP runtime is not available because: The PHP runtime cannot be run with the "Memcache" PECL extension installed
So what could possibly be the reason for error?
The reason for the error is that you did not install PHP for the App Engine Development server properly.
Is it not possible to run this along with the existing PHP setup?
That not only depends on the development server but also on your existing PHP setup. For your specific setup, you need to disable the "Memcache" PECL extension. I assume you have not compiled it in, so all you need is to (temporarily) change your php.ini file.
You can run it along an existing PHP setup by using different configurations (see as well the PHPRC environment variable). It's likely not an out-of-the-box experience, so expect to fiddle a little until you find your perfect setup and workflow.
For compatibility reasons you should consider to establish a setup of the same PHP version in parallel on your development machine that is also available on Google App Engine (e.g. PHP 5.4.8 as of now). You can install more than one PHP version on the same system, however, this is not covered by your Ubuntu package manager.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With