1

I'm trying get the helloworld example for the Google Appengine PHP SDK working, but I can't seem to get the dev_appserver to even run. This is the command line I use and the error I get:

$ /opt/google-appengine-php/dev_appserver.py --php_executable_path=/usr/bin/php-cgi src
INFO     2013-06-14 02:50:09,070 sdk_update_checker.py:244] Checking for updates to the SDK.
INFO     2013-06-14 02:50:09,331 sdk_update_checker.py:260] Update check failed: HTTP Error 404: Not Found
INFO     2013-06-14 02:50:09,458 api_server.py:138] Starting API server at: http://localhost:39069
INFO     2013-06-14 02:50:09,647 dispatcher.py:164] Starting server "default" running at: http://localhost:8080
INFO     2013-06-14 02:50:09,650 admin_server.py:117] Starting admin server at: http://localhost:8000
ERROR    2013-06-14 02:50:09,717 php_runtime.py:199] The PHP runtime is not available because: No input file specified.

The output from php-cgi -v is:

PHP 5.4.16 (cgi-fcgi) (built: Jun  7 2013 05:55:42)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

The output from whereis php-cgi is:

php-cgi: /usr/bin/php-cgi

I looked at the php_runtime.py file but I can't even find the string No input file specified so I'm stumped!

Anyone have any idea what the problem is?

EDIT: I just tried running fgrep -r 'No input file specified' * in the App Engine directory and nothing shows up!!!

EDIT 2: It seems the message No input file specified comes from the PHP interpreter, no the App Engine SDK. But I still have no idea why?! the app.yaml and helloworld.php files are in the same directory and are copied from the tutorial page.

4

1 回答 1

1

看来问题是我安装系统的方式。我的 /home 目录实际上是 /var/home 的符号链接(我有两个分区:/ 和 /var),但是 PHP 有一个指令来限制它从哪里加载文件,open_basedir。默认情况下,它包含 /home 但 PHP 解析符号链接,因此我的所有文件都来自 /var/home 和 /var(或以下任何内容)不包括在内。

所以解决方案是在我的文件的指令中/home替换为。/var/homeopen_basedir/etc/php/php.ini

编辑:另外,因为我安装了 AppEngine PHP SDK,/opt/google-appengine-php所以我也必须添加那个目录open_basedir

于 2013-06-14T12:46:37.797 回答