php app update:文件名中的字符无效

时间:2013-05-29 19:49:56

标签: php google-app-engine

上传使用Wordpress

的php应用程序时出现问题
* version - 1.8.0
* language - php
* operating system - Windows 7

更新到GAE会显示许多文件的以下错误。尝试重命名几个文件,但错误弹出另一个文件,依此类推。这些是wordpress 3.5.1个文件。

Error 400: --- begin server output ---
Invalid character in filename: __static__\wordpress/wp-includes/css/admin-bar.css
--- end server output ---

app.yaml内容:

-------------------------------------------
application: fargocricketclub
version: 1
runtime: php
api_version: 1
threadsafe: yes

handlers:
- url: /(.*\.(htm$|html$|css$|js$))
  static_files: wordpress/\1
  upload: wordpress/(.*\.(htm$|html$|css$|js$))
  application_readable: true

- url: /wp-content/(.*\.(ico$|jpg$|png$|gif$))
  static_files: wordpress/wp-content/\1
  upload: wordpress/wp-content/(.*\.(ico$|jpg$|png$|gif$))
  application_readable: true

- url: /(.*\.(ico$|jpg$|png$|gif$))
  static_files: wordpress/\1
  upload: wordpress/(.*\.(ico$|jpg$|png$|gif$))

- url: /wp-admin/(.+)
  script: wordpress/wp-admin/\1
  secure: always

- url: /wp-admin/
  script: wordpress/wp-admin/index.php
  secure: always

- url: /wp-login.php
  script: wordpress/wp-login.php
  secure: always

- url: /wp-cron.php
  script: wordpress/wp-cron.php
  login: admin

- url: /xmlrpc.php
  script: wordpress/xmlrpc.php

- url: /(.+)?/?
  script: wordpress/index.php

2 个答案:

答案 0 :(得分:0)

我认为这在App Engine 1.8.1版本中得到修复,使用上面提出的解决方案使用OS特定路径分隔符加入路径。

答案 1 :(得分:0)

在PHP&中看到的问题使用application_readable时,在Windows上进行Python 1.8.1部署。问题已标记为:https://code.google.com/p/googleappengine/issues/detail?id=9558

解决方法:

用google \ appengine \ tools \ appcfg.py中的posixpath.join替换了os.path.join