4

Here I explained the issue in detail:

: file_exists(): open_basedir restriction in effect. File(/autoload.php) is not within the allowed path(s): (/var/www/:/tmp/) in /var/www/mywebsite.com/public_html/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php

This error shows in admin login page:

enter image description here

1 Answer 1

1

Warning: file_exists(): open_basedir restriction in effect. File(/autoload.php) is not within the allowed path(s): (/var/www/:/tmp/) in /var/www/domain.com/public_html/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php on line 69

Your issue is similar to Magento 2 error: open_basedir restriction in effect.

To find the root cause of the issue, you can add an Xdebug breakpoint prior to line 69 or use the debug_print_backtrace() function to print the backtrace.

However, open_basedir often causes more trouble for Magento than it’s worth. It can lead to degraded performance because Magento relies on numerous files working together across several directories. It's therefore recommended to disable the open_basedir function on the server hosting your Magento site. You can find more information about this on NexCess blog at https://www.nexcess.net/blog/php-open-basedir/

2
  • hello @Tu Van Thank you so much for answer it's answer also 100% work for me but can i get anymore solution instead of disable open_basedir function on the server. –
    – Jay Parmar
    Nov 10, 2023 at 12:11
  • Hi @JayParmar. Yep, I've pointed out the direction to address it in my answer: finding the root cause of the issue, which may be caused by a custom module or a third-party extension. You can then resolve it.
    – Tu Van
    Nov 10, 2023 at 18:32

Your Answer

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

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