在1.9.6中,一切都运行良好。我更改到了1.10,现在我对基本上每个应用程序资源都有很多警告。
看起来ZF正在我设置的“自定义资源”路径中寻找应用程序资源: pluginpaths.App_Application_Resource =“应用程序/应用程序/资源。有什么方法可以避免这种情况吗!?(提前感谢您的宝贵时间)
application.ini:
resources.locale.default = sq_AL
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.frontController.throwExceptions = 0
; VIEW & HTML Markup Options
resources.view.doctype = "HTML5"
resources.view.language = "en"
resources.view.setSeparator=" - "
resources.view.helperPath.View_Helper = APPLICATION_PATH "/views/helpers"
resources.view[] =
; custom resources
**pluginpaths.App_Application_Resource = "App/Application/Resource"**在库/应用程序/应用程序/资源/缓存中,我有一个"App_Application_Resource_Cache extends Zend_Application_Resource_ResourceAbstract“类,它是缓存所需的。问题是,现在在第一个页面上,我有很多警告,比如:
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/App/Application/Resource/Locale.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/php/modules/App/Application/Resource/Locale.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/App/Application/Resource/Frontcontroller.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/php/modules/App/Application/Resource/Frontcontroller.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/App/Application/Resource/Layout.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/php/modules/App/Application/Resource/Layout.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/./views/helpers/Doctype.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/php/modules/./views/helpers/Doctype.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/./views/helpers/HeadMeta.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib64/php/modules/./views/helpers/HeadMeta.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/./views/helpers/HeadTitle.php) is not within the allowed path(s): (/var/home//httpdocs:/tmp:/var/home/) in /var/home//library/Zend/Loader.php on line 190以防有人需要它,在引导程序中,这是自动加载器
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader(
array(
'namespace' => 'App',
'basePath' => dirname(__FILE__),
)
);
return $autoloader;
}发布于 2010-02-21 07:21:06
好了,这个问题在评论中进行了排序:)将这个问题变成一个你可以接受的答案来结束这个问题。
不允许从PHP脚本访问该路径,请查看错误消息(/usr/share不在允许的目录列表中)。将包含路径更改为(我猜) /var/home/library/Zend/应该可以解决这个问题。
PLESK & CentOS显然有一个问题,无法从虚拟主机访问
的包含路径!
我认为这是由于open_basedir设置禁止虚拟主机访问它们之外的任何东西,而不是特定于操作系统。不管怎样,很高兴它被整理好了!
发布于 2010-02-21 07:12:40
@Pekka
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
//get_include_path(),
)));通过注释掉get_include/path() (在index.php中),我在/usr/share/php/中省略了include。警告消失了。
感谢您(极好的)的帮助!
显然,PLESK & CentOS有一个问题,无法从虚拟主机访问PHP的包含路径!
https://stackoverflow.com/questions/2304022
复制相似问题