2013-10-18 19 views
0

我安裝使用谷歌應用程序引擎WordPress和使用這個命令來運行應用程序,APP_DIR包含app.yaml中,php.ini文件和WordPress:LAMP ubuntu12.04中的php_executable_path是什麼?

google_appengine/dev_appserver.py app_dir/ 

遇到這些錯誤:

File "/home/g1m/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 222, in new_instance self._check_environment(php_executable_path) File "/home/g1m/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 147, in _check_environment 'flag (%s) does not exist.' % php_executable_path) _PHPBinaryError: The path specified with the --php_executable_path flag() does not exist.

我試圖用這個URL來訪問應用程序:本地主機:8080,並得到以下錯誤:

The path specified with the --php_executable_path flag() does not exist.

請幫我解決這個問題,我s LAMP中的php_executable_path的值,因爲我使用UBUNTU12.04操作系統,它是/ etc/php/cgi嗎?

請讓我知道我做錯了什麼。

+0

我知道了,知道什麼是可執行文件路徑安裝php-cgi binar,https://developers.google.com/appengine/docs/php/gettingstarted/installinglinux – Halku

回答

2

請務必先安裝它這樣做:

sudo apt-get install php5-cgi 

然後在我的情況下運行PHP,CGI

sudo find/-name php-cgi 

搜索找到它,我發現它在:在/ usr/bin中/ php-cgi

0

我認爲這個錯誤的原因是GAE需要使用cgi而不是cli。它們的區別在於,cli(命令行界面)適用於獨立應用程序,而不適用於web應用程序(默認情況下,它不會輸出html標題)。如果安裝了PHP,CGI,你可以當你開始開發服務器

<PATH_TO_SDK>app_devserver.py --php_executable_path=/usr/bin/php-cgi <your_project_name> 

註明如果你不知道,你可以搜索它像dsb005建議這樣的路徑。 如果它沒有安裝...嗯...也許你錯過了這一次在GAE上的文件:

HP 5.4 is not packaged on most Linux distributions so it may be easiest to install it from source. On Debian-based Linux systems, you can use the following commands to install PHP 5.4 in such a way that it won't effect any other versions of PHP that you may have installed:

我建議您遵循 https://developers.google.com/appengine/docs/php/gettingstarted/installinglinux指令,看看它是否工作。當你沒有閱讀手冊時,這總是一種回報。我這樣做有時:(