0

我注意到 apache2 error.log 中有一些问题。我的服务器收到来自 ip 地址 66.249.72.182,66.249.78.76 (googlebot???) 的请求,并且在 /var/log/apache2/error.log 我有记录:

[error] [client 66.249.72.182] PHP Fatal error:  require_once(): Failed opening  required 'Zend/Cloud/Infrastructure/Instance.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/xxxx.com/library/Zend/Cloud/Infrastructure/InstanceList.php on line 10
[error] [client 66.249.72.182] PHP Warning:  require_once(Zend/Gdata/Extension.php): failed to open stream: No such file or directory in /var/www/xxxx.com/library/Zend/Gdata/Photos/Extension/PhotoId.php on line 27
[error] [client 66.249.78.76] PHP Warning:  require_once(Zend/Gdata/Extension.php): failed to open stream: No such file or directory in /var/www/xxxx.com/library/Zend/Gdata/Photos/Extension/NumPhotosRemaining.php on line 27

等等。我认为请求 /library/Zend/* 中的所有文件。我不明白怎么做。在 .htaccess 中:

RewriteRule ^.*$ index.php [NC,L]

在 index.php 中:

set_include_path(implode(PATH_SEPARATOR, array(
   realpath(APPLICATION_PATH . '/../library'),
   get_include_path(),
)));

我不明白哪里有问题。谢谢你的帮助!

4

1 回答 1

1

检查您的 access.log 以了解它们是如何被访问的。也许那是一些虚拟主机,使公众可以访问库路径。显然,您的库和应用程序目录应该位于相对于 DocumentRoot 的上一级,并且应该关闭目录索引。

于 2013-06-13T20:15:59.527 回答