1

I have recently installed magento 2.3.4 via softaculous app installer. Site works fine but while I try to login as admin its displays An error has happened during application run. See exception log for details. When I check it says

[2020年03月05日 14:15:16] main.CRITICAL: Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/admin/web/shop.rrsmedia.tk/public_html:/home/admin/tmp) in /home/admin/web/shop.rrsmedia.tk/public_html/vendor/magento/framework/Filesystem/DirectoryList.php on line 101 {"exception":"[object] (Exception(code: 0): Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/admin/web/shop.rrsmedia.tk/public_html:/home/admin/tmp) in /home/admin/web/shop.rrsmedia.tk/public_html/vendor/magento/framework/Filesystem/DirectoryList.php on line 101 at /home/admin/web/shop.rrsmedia.tk/public_html/vendor/magento/framework/App/ErrorHandler.php:61)"} []`.

I try again after making open_basedir value to none in php.ini and still get the same error.

Anyone can help me with this??

Thanks.

Dhaduk Mitesh
1,6951 gold badge13 silver badges29 bronze badges
asked Mar 6, 2020 at 5:31
2

2 Answers 2

1

To resolve this error, you must edit the file httpd.conf. For example, in my case this way - /etc/httpd/httpd.conf. Open the file httpd.conf, find the parameter open_basedir and set it to none. (php_admin_value open_basedir none)

Please refer to the PHP manual for more info: https://www.php.net/manual/en/ini.core.php#ini.open-basedir

answered Mar 6, 2020 at 6:57
1
  • I have already done this but still stuck at same error. When I check using phpinfo(); it says master-value: none and local value:/home/admin/web/shop.rrsmedia.tk/public_html:/home/admin/tmp. I think Magento set the php paramerter for local use. I can't find a way to disable local value set by magento. Can you resolve this? Commented Mar 13, 2020 at 4:44
0

Thanks Everyone, I just sort out the error. Just go to

/home/admin/conf/web nano your.website.apache2.conf

find

php_admin_value open_basedir

place a " # " before it and close the file.

then edit ssl version of same configuration

nano your.website.apache2.ssl.conf and repeat the above process.

then restart apache2 service by systemctl restart apache2

this should fix your problem. This method works for me.

Ubuntu 18.04 LTS

Vesta CP

answered Mar 19, 2020 at 16:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.