Deployment Google PHP AppEngine-未上载PHP文件的部署问题

Deployment Google PHP AppEngine-未上载PHP文件的部署问题,deployment,google-cloud-platform,Deployment,Google Cloud Platform,我有一个非常简单的PHP应用程序,允许用户在搜索框中输入城市名称或邮政编码,用户可以根据存储在我的Google CloudSQL server中的数据自动获得完整的建议 html-呈现一个简单的搜索框,用户可以在其中输入搜索键并获得自动完成的建议。通过Twitter的typeahead.js库(jQuery插件)完成 city.php-充当翻译层的php文件。接收来自浏览器的请求并启动与我的Google CloudSQL server的连接,在那里我有一个包含一些城市和zipcode数据的简单

我有一个非常简单的PHP应用程序,允许用户在搜索框中输入城市名称或邮政编码,用户可以根据存储在我的Google CloudSQL server中的数据自动获得完整的建议

  • html-呈现一个简单的搜索框,用户可以在其中输入搜索键并获得自动完成的建议。通过Twitter的typeahead.js库(jQuery插件)完成

  • city.php-充当翻译层的php文件。接收来自浏览器的请求并启动与我的Google CloudSQL server的连接,在那里我有一个包含一些城市和zipcode数据的简单数据库。将数据作为数组返回浏览器

这在我的本地Mac OS X Apache服务器上运行。我正试图让这个设置在谷歌PHP AppEngine上运行。我创建了一个app.yaml文件,如下所示:

runtime: php55
api_version: 2
threadsafe: true

handlers:
- url: /
static_files: index.html
upload: index.html

- url: /(.*)
static_files: www/\1
upload: (.*)

- url: /(.+\.php)$
script: \1
这就是我遇到问题的地方。当我从本地文件夹(其中包含index.html、city.php和app.yaml)运行gcloud app deploy时,我在日志中得到以下消息

Some files were skipped. Pass `--verbosity=info` to see which ones.
You may also view the gcloud log file, found at
[/Users/arjunshah/.config/gcloud/logs/2016.11.13/12.31.04.137587.log].
当我使用日志详细性运行gcloud app deploy时,我会看到以下内容:

INFO: Could not find any remote repositories associated with     [/Users/arjunshah/Documents/autocomplete]. Cloud diagnostic tools may not be able to display the correct source code for this deployment.
File upload done.
INFO: Manifest: [{'app.yaml': {'sourceUrl':      'https://storage.googleapis.com/staging.ashah-146101.appspot.com/abbe3c7fc03eb43497686990488c54e2ae0533ea', 'sha1Sum': 'abbe3c7fc03eb43497686990488c54e2ae0533ea'}, 'index.html': {'sourceUrl': 'https://storage.googleapis.com/staging.ashah-146101.appspot.com/1865620cc55de1902c2a9636df601f532cb2657a', 'sha1Sum': '1865620cc55de1902c2a9636df601f532cb2657a'}, 'city.php': {'sourceUrl': 'https://storage.googleapis.com/staging.ashah-146101.appspot.com/64999cc8da06416a54be99c43e6e017aa0c1d01a', 'sha1Sum': '64999cc8da06416a54be99c43e6e017aa0c1d01a'}}]
Updating service [default]...
INFO: Previous default version [ashah-146101/default/20161113t122802] is an automatically scaled standard environment app, so not stopping it.                   
html页面可以正常加载,但当我尝试输入城市名称(我知道它们在数据库中)时,我在Google Browser Inspect元素控制台中看到以下错误

Failed to load resource: https://ashah-146101.appspot.com/city.php?query=P the server responded with a status of 404 ()

请帮忙

这是一个不太可能的解决方案,但值得一试:能否更改app.yaml文件中请求路径处理程序的顺序?似乎第
url:/(.*)
行使得请求无法到达较低的第
url/(.+\.php)$
。这可能是部署跳过这些文件的原因,但这只是一个假设。当用户看到此错误消息时,建议采取一种我不能确定是否相关的解决方法,但也可能有效,因此请稍后尝试:运行
gcloud config set app/num\u file\u upload\u processs 1
。不清楚发生了什么,如果您对此问题不感兴趣,未来的用户将无法确定发生了什么。这种情况还在你身上发生吗?你看过我的最新评论了吗?这是一个不太可能的解决方案,但值得一试:你能改变app.yaml文件中请求路径处理程序的顺序吗?似乎第
url:/(.*)
行使得请求无法到达较低的第
url/(.+\.php)$
。这可能是部署跳过这些文件的原因,但这只是一个假设。当用户看到此错误消息时,建议采取一种我不能确定是否相关的解决方法,但也可能有效,因此请稍后尝试:运行
gcloud config set app/num\u file\u upload\u processs 1
。不清楚发生了什么,如果您对此问题不感兴趣,未来的用户将无法确定发生了什么。这种情况还在你身上发生吗?你看过我最近的评论了吗?