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.
-
Seems like a permission issue on files/folder. Please refer devdocs.magento.com/guides/v2.3/config-guide/prod/…Kapil Karangeeya– Kapil Karangeeya2020年03月06日 05:35:24 +00:00Commented Mar 6, 2020 at 5:35
-
Run the commands, give proper permission for folders and check it.Saravanan DS– Saravanan DS2020年03月06日 05:46:20 +00:00Commented Mar 6, 2020 at 5:46
2 Answers 2
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
-
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– Rashmi Ranjan2020年03月13日 04:44:39 +00:00Commented Mar 13, 2020 at 4:44
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