【发布时间】:2015-01-28 23:47:36
【问题描述】:
您好,我正在尝试在共享主机上安装 symfony2,但无法正常工作。似乎我收到一个 open_basedir 错误,我不知道如何解决它。我使用的是 PhP 5.3,所以这应该不是问题。在本地电脑上,它与 wamp 一起工作,但我需要在 shared.I 上使用它。我提到我问过托管服务提供商,但我无法关闭 open_basedir。这是错误:
ContextErrorException in ExecutableFinder.php line 59:
Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/usr/php4/lib/php) is not within the allowed path(s): (/home/websoft:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp)
in ExecutableFinder.php line 59
at ErrorHandler->handleError('2', 'is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/usr/php4/lib/php) is not within the allowed path(s): (/home/websoft:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp)', '/home/websoft/public_html/symfony24-test/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php', '59', array('name' => 'java', 'default' => '/usr/bin/java', 'extraDirs' => array(), 'searchPath' => array('/home/websoft', '/usr/lib/php', '/usr/php4/lib/php', '/usr/local/lib/php', '/usr/local/php4/lib/php', '/tmp'), 'dirs' => array('/home/websoft', '/usr/lib/php'), 'path' => '/usr/php4/lib/php'))
at is_dir('/usr/php4/lib/php') in ExecutableFinder.php line 59
at ExecutableFinder->find('java', '/usr/bin/java') in Configuration.php line 67
at Symfony\Bundle\AsseticBundle\DependencyInjection\{closure}() in VariableNode.php line 54
at VariableNode->getDefaultValue() in ArrayNode.php line 241
at ArrayNode->finalizeValue(array('debug' => true, 'use_controller' => array('enabled' => true), 'bundles' => array(), 'filters' => array('cssrewrite' => array()))) in BaseNode.php line 303
at BaseNode->finalize(array('debug' => true, 'use_controller' => array('enabled' => true), 'bundles' => array(), 'filters' => array('cssrewrite' => array()))) in Processor.php line 37
at Processor->process(object(ArrayNode), array(array('debug' => true, 'use_controller' => false, 'bundles' => array(), 'filters' => array('cssrewrite' => null)), array('use_controller' => true))) in Processor.php line 50
at Processor->processConfiguration(object(Configuration), array(array('debug' => true, 'use_controller' => false, 'bundles' => array(), 'filters' => array('cssrewrite' => null)), array('use_controller' => true))) in AsseticExtension.php line 44
at AsseticExtension->load(array(array('debug' => true, 'use_controller' => false, 'bundles' => array(), 'filters' => array('cssrewrite' => null)), array('use_controller' => true)), object(ContainerBuilder)) in MergeExtensionConfigurationPass.php line 50
at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in MergeExtensionConfigurationPass.php line 39
at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in Compiler.php line 117
at Compiler->compile(object(ContainerBuilder)) in ContainerBuilder.php line 614
at ContainerBuilder->compile() in bootstrap.php.cache line 2564
at Kernel->initializeContainer() in bootstrap.php.cache line 2343
at Kernel->boot() in bootstrap.php.cache line 2374
at Kernel->handle(object(Request)) in app_dev.php line 22
【问题讨论】:
-
问题在于您的 apache 设置。您正在尝试将基本目录设置为超出配置 apache 的允许目录的页面。看这里:stackoverflow.com/questions/1846882/…
-
我没有任何 php 配置文件的访问权限,这意味着我无法解决这个问题吗?:)