PHP与nginx致命错误

问题描述 投票:0回答:2

我以PHP形式,当我在Wordpress主题中作为订阅者提交一封电子邮件时,错误.log中的下一个错误:

2013/08/03 21:39:22 [错误] 19544#0:* 11 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(TEMPLATEPATH/functions/theme-functions.php): failed to open stream: No such file or directory in /web/domain.com/public/wp-content/themes/launcheffect/functions.php on line 151

PHP消息:PHP Fatal error: require_once(): Failed opening required 'TEMPLATEPATH/functions/theme-functions.php' (include_path='.:/usr/share/php:/usr/share/pear') in /web/domain.com/public/wp-content/themes/launcheffect/functions.php on line 151" while reading response header from upstream, client: 71.28.74.212, server: www.domain.com, request: "POST /wp-content/themes/launcheffect/post.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.domain.com", referrer: "http://www.domain.com/"

我一直在阅读关于权限,关于nginx和fastcgi,关于PHPfpm,审查我的配置......没有成功。更多,我的其他网站工作得很好,而且这个主题在几天前运作良好。

我当然是那个文件/目录。

我的nginx.conf:

http://pastebin.com/5VB1BzHj

谁能帮我解决这个错误?

提前致谢!

wordpress nginx fastcgi php
2个回答
0
投票

查看您的示例错误,您似乎没有正确格式化require。它应该看起来像这样:

require_once(TEMPLATEPATH . '/functions/theme-functions.php');

确保您也定义了TEMPLATEPATH。

define("TEMPLATEPATH ", "/this/is/your/path");

最后,这应输出一个字符串:

/this/is/your/path/functions/theme-functions.php

0
投票

对于有此问题的任何人,请仔细检查您的文件路径和文件名,因为我的错误是大写字母错误的文件路径

© www.soinside.com 2019 - 2024. All rights reserved.