I was doing a non-personal project when I suddenly bumped into this error.
ContextErrorException in ExecutableFinder.php line 59:
Warning: is_dir(): open_basedir restriction in effect. File(/usr/lib/php) is not within the allowed path(s): (/var/www/allservice:/usr/lib/php:/usr/lib/php5:/tmp:/usr/bin/php)
Here's the phpinfo() of open_basedir settings.
/var/www/allservice:/usr/lib/php:/usr/lib/php5:/tmp:/usr/bin/php
I'm getting this error on my hosting. In local environment everything works fine. I've tried re-installing Symfony via Composer and cleaning cache. Nothing helps.
Since it stopped working on the hosting and works locally, as far as I understand this may be PHP or Apache settings issue?
Here's the full error.
- in ExecutableFinder.php line 59
- at ErrorHandler->handleError('2', 'is_dir(): open_basedir restriction in effect. File(/usr/lib/php) is not within the allowed path(s): (/var/www/allservice:/usr/lib/php:/usr/lib/php5:/tmp:/usr/bin/php)', '/var/www/allservice/allservice.in.ua/testPHP/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php', '59', array('name' => 'java', 'default' => '/usr/bin/java', 'extraDirs' => array(), 'searchPath' => array('/var/www/allservice', '/usr/lib/php', '/usr/lib/php5', '/tmp', '/usr/bin/php'), 'dirs' => array('/var/www/allservice'), 'path' => '/usr/lib/php'))
- at is_dir('/usr/lib/php') in ExecutableFinder.php line 59
- at ExecutableFinder->find('java', '/usr/bin/java') in Configuration.php line 67
- at Configuration->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 29