我注意到 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(),
)));
我不明白哪里有问题。谢谢你的帮助!