gpt4 book ai didi

php - Google App Engine 和 Wordpress 设置错误 - Windows 7 专业版

转载 作者:行者123 更新时间:2023-12-02 07:00:52 24 4
gpt4 key购买 nike

我正在尝试根据 https://developers.google.com/appengine/articles/wordpress 上的说明设置 Google App Engine 和 Wordpress 3.8 版

但是当我运行 $ APP_ENGINE_SDK_PATH/dev_appserver.py APPLICATION_DIRECTORY 时出现错误

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

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

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

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

最佳答案

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

您必须删除它:

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

或者使用语义上等价的(错误的):

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

干杯!!

关于php - Google App Engine 和 Wordpress 设置错误 - Windows 7 专业版,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21148567/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com