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.

| improve this question | | | | |
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

| improve this answer | | | | |
  • 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? – Rashmi Ranjan Mar 13 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

| improve this answer | | | | |

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.