1

When I log into admin panel on the server. I'm getting error

Exception #0 (Exception): Warning: is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s): 

The strange thing is the same configuartion works well on my local machine. But I'm getting the following errors on the server.

Does anyone has any suggestions regarding it?

Below is the stack trace:

1 exception(s):
Exception #0 (Exception): Warning: is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s): (/var/www/vhosts/incase.ability.nl/:/tmp/) in /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php on line 914

Exception #0 (Exception): Warning: is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s): (/var/www/vhosts/incase.ability.nl/:/tmp/) in /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php on line 914
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'is_dir(): open_...', '/var/www/vhosts...', 914, Array)
#1 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php(914): is_dir('/etc/pki/tls/ce...')
#2 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php(801): Composer\Util\RemoteFilesystem->getSystemCaRootBundlePath()
#3 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php(61): Composer\Util\RemoteFilesystem->getTlsDefaults(Array)
#4 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/composer/composer/src/Composer/Factory.php(566): Composer\Util\RemoteFilesystem->__construct(Object(Composer\IO\BufferIO), Object(Composer\Config), Array, false)
#5 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/composer/composer/src/Composer/Factory.php(306): Composer\Factory::createRemoteFilesystem(Object(Composer\IO\BufferIO), Object(Composer\Config))
#6 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/composer/composer/src/Composer/Factory.php(532): Composer\Factory->createComposer(Object(Composer\IO\BufferIO), Array, false)
#7 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Composer/ComposerFactory.php(47): Composer\Factory::create(Object(Composer\IO\BufferIO), '/var/www/vhosts...')
#8 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Composer/ComposerInformation.php(362): Magento\Framework\Composer\ComposerFactory->create()
#9 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Composer/ComposerInformation.php(375): Magento\Framework\Composer\ComposerInformation->getComposer()
#10 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Composer/ComposerInformation.php(242): Magento\Framework\Composer\ComposerInformation->getLocker()
#11 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/App/ProductMetadata.php(104): Magento\Framework\Composer\ComposerInformation->getSystemPackages()
#12 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/App/ProductMetadata.php(65): Magento\Framework\App\ProductMetadata->getSystemPackageVersion()
#13 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/module-admin-notification/Model/Feed.php(208): Magento\Framework\App\ProductMetadata->getVersion()
#14 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/module-admin-notification/Model/Feed.php(138): Magento\AdminNotification\Model\Feed->getFeedData()
#15 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/module-admin-notification/Observer/PredispatchAdminActionControllerObserver.php(51): Magento\AdminNotification\Model\Feed->checkUpdate()
#16 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\AdminNotification\Observer\PredispatchAdminActionControllerObserver->execute(Object(Magento\Framework\Event\Observer))
#17 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\AdminNotification\Observer\PredispatchAdminActionControllerObserver), Object(Magento\Framework\Event\Observer))
#18 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#19 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('controller_acti...', Array)
#20 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/App/Action/Action.php(91): Magento\Framework\Event\Manager\Proxy->dispatch('controller_acti...', Array)
#21 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->___callParent('dispatch', Array)
#24 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor), Array, 'adminAuthentica...')
#25 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#26 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#27 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor), Array, 'adminMassaction...')
#28 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#29 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#30 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/var/generation/Magento/Backend/Controller/Adminhtml/Index/Index/Interceptor.php(26): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#31 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/App/FrontController.php(55): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#33 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#34 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#35 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#36 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#37 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#38 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#39 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#40 /var/www/vhosts/incase.ability.nl/httpdocs/incase_website/incase/incase/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#41 {main}
3

This issue comes due to SSL. If you are not using SSL then disable tls from composer.json as below:-

config": { "use-include-path": true "disable-tls":true }

Refer https://magento.stackexchange.com/a/172434

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.