Google App Engine和Wordpress设置错误 - Windows 7专业版 [英] Google App Engine and Wordpress set up error - Windows 7 professional

查看:93
本文介绍了Google App Engine和Wordpress设置错误 - Windows 7专业版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据 https:但是当我运行 $ APP_ENGINE_SDK_PATH / dev_appserver.py APPLICATION_DIRECTORY 时, / code>我有错误


无法赋值'wordpress /。。(htm | html | $'to
'upload''value'wordpress /.
。(htm | html | css | js)$'上传不
匹配表达式'^(在第9行app.yaml中的''$('!!\ ^)。*(?! \ $)。
11

这是我的app.yaml文件的内容:

  application:thangvmwordpressdemo 
version :1
运行时:php
api_version:1

处理程序:
- url:/(.*\.(htm|html|css|js)) $
static_files:wordpress / \ 1
上传:wordpress /.* \\。(htm | html | css | js)
application_readable:true
$ b - url:/wp-content/(.*\.(ico|jpg|png|gif) )$
static_files:wordpress / wp-content / \ 1
upload:wordpress / wp-content /.* \。(ico | jpg | png | gif)$
application_readable: true
$ b $ - url:/(.*\.(ico|jpg|png|gif))$
static_files:wordpress / \ 1
上传:wordpress /。 * \。(ico | jpg | png | gif)$

- url:/wp-admin/(.+)
script:wordpress / wp-admin / \ 1
安全:总是

- url:/ wp-admin /
脚本:wordpress / wp-admin / index.php
安全:总是

- url:/wp-login.php
脚本:wordpress / wp-login.php
安全:总是

- url:/wp-cron.php
脚本:wordpress / wp-cron.php
登录名:admin
$ b $ - url:/xmlrpc.php
脚本:wordpress / xmlrpc.php

- url:/wp-(.+ ).php
脚本:wordpress / wp-\ 1.php

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

你可以让我解决这个问题吗?
非常感谢!

截至2014年1月19日,该文章不适用于当前的Google App Engine适用于PHP SDK v1.8.9(Windows)。问题是handlers.upload属性的最终正则表达式结尾($)。我不确定为什么会发生这种情况,何时会得到解决,但是,您可以尝试以下任何解决方法:



您必须删除它:

 处理程序:
- url:/.*\.(htm|html|css|js)
static_files:wordpress / \ 1
upload:wordpress /.* \。(htm | html | css | js)
application_readable:true

或者使用语义上相同的(对错误的):

 处理程序:
- url:/.*\.(htm|html|css|js)
static_files:wordpress / \ 1
上传:wordpress /.* \。 (htm $ | html $ | css $ | js $)
application_readable:true

干杯!!


I'm trying to set up Google App Engine and Wordpress version 3.8 according to instruction at https://developers.google.com/appengine/articles/wordpress

But when I run $ APP_ENGINE_SDK_PATH/dev_appserver.py APPLICATION_DIRECTORY I have got the error

Unable to assign value 'wordpress/..(htm|html|css|js)$' to attribute 'upload:' value 'wordpress/..(htm|html|css|js)$' for upload does not match expression '^(?:(?!\^).*(?!\$).)$' in app.yaml in line 9, column 11

Here is my app.yaml file's content:

application: thangvmwordpressdemo
version: 1
runtime: php
api_version: 1

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: /wp-(.+).php
  script: wordpress/wp-\1.php

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

Can you have me solve this problem? Thank you so much!

解决方案

As of 19 Jan 2014 that article doesn´t work with current Google App Engine for PHP SDK v1.8.9 (Windows). The problem is the final regex ending ($) of the handlers.upload attribute. I´m not sure why this has happened and when it will get fixed, however, you can try any of the following workarounds:

You have to either remove it:

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

or use the semantically equivalent (to the faulty one):

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

Cheers !!

这篇关于Google App Engine和Wordpress设置错误 - Windows 7专业版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆