我注意到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(),
)));
我不明白问题出在哪里。谢谢你的帮助!
答案 0 :(得分:1)
检查您的access.log以查看它们的访问方式。也许这是一些虚拟主机,使公众可以访问库路径。显然,您的库和应用程序目录应该相对于DocumentRoot保持一级,并且应该关闭目录索引。