无法在安装了“Memcache”PECL扩展的情况下运行PHP运行时

我正在尝试在Google App Engine上运行示例php脚本.

Installing the PHP SDK on Linux Google Developer Docs,我跳过安装PHP,因为我已经在我的Ubuntu系统上安装了它,之前安装它为sudo apt-get install php5和php 5- *.我的php-cgi位于/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

那可能是错误的原因?是否无法与现有的PHP设置一起运行?

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?

出错的原因是您未正确安装App Engine Development服务器的PHP.

Is it not possible to run this along with the existing PHP setup?

这不仅取决于开发服务器,还取决于您现有的PHP设置.对于您的特定设置,您需要禁用“Memcache”PECL扩展.我假设你没有编译它,所以你需要的是(暂时)更改你的php.ini文件.

您可以使用不同的配置在现有的PHP设置中运行它(请参阅the PHPRC environment variable).它可能不是一种开箱即用的体验,所以在你找到完美的设置和工作流程之前,一定要先调整一下.

出于兼容性原因,您应该考虑在开发计算机上并行建立相同PHP版本的设置,该版本也可以在Google App Engine上使用(例如,PHP 5.4.8至今).您可以在同一系统上安装多个PHP版本,但是,Ubuntu软件包管理器不会涵盖此版本.

相关文章