• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved file_exists(): open_basedir restriction in effect - Obsidian with PHP 8.1

Klaazzzzzz

New Pleskian
I uploaded my first Statamic 3.3 website (Based om Laravel 8) in new subscription on my Ubuntu server with Obsidian. This Laravel version needs PHP >8.02 so I updated Obsidian with PHP 8.1 and selected this PHP version in the subscription.

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ErrorException: file_exists(): open_basedir restriction in effect. File(/var/www/project/resources/views/errors/500.blade.php) is not within the allowed path(s): (/var/www/vhosts/project.com/:/tmp/) in /var/www/vhosts/project.com/httpdocs/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:28

  • Statamic uses Antlers templates, not Blade. I never used Blad in the fresh project
  • Statamic is a flat file CMS, there is no database, all files are uploade exactlyd like they are on the development server (Where it works flawlessly)
  • The filepath misses 'vhosts/project.com/httpdocs', IMHO necessary because the file paths does not exists. I don't know why it makes this up because I did not configure this

I just uploaded files & directories, just like I do on other projects. I also set the right permissions on the storage and bootstrap/cache directory. I don't understand why this is not working.
 
User Afonic in Statamic site in Plesk Obsidian (open_basedir restriction in effect) · Discussion #5543 · statamic/cms gave the right suggestion so could solve the issue.

I did not have to delete the vendor folder, just composer dump-autoload was enough.

One thing I had to change for that to work was the CLI PHP version. In Plesk you can install and select multiple PHP versions so every project can have it's own specific PHP version. But even if you choose PHP 8.1 in the project in Plesk's interface, the terminal PHP CLI version will not change. In my case this was defaulted to PHP 7.4 which was not recent enough of course.

But you can change that in the terminal: export PATH=/opt/plesk/php/8.1/bin:$PATH; This is temporary, after logging out it will be the old default again again.
 
Hello Mow and Klaazzzzzz,

I have something similar issue when I check the Logs for my website. I have a PHP script with Laravel, the site opens fine, and I don’t want to have any issues in the future or now, which I might not notice yet since I am new to Plesk.

Here is the error message I get:

AH01071: Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/autoload.php) is not within the allowed path(s): (/var/www/vhosts/MySite.com/:/tmp/) in /var/www/vhosts/MySite.com/httpdocs/vendor/vonage/nexmo-bridge/src/Autoloader.php on line 69', referer: https://MySite.com

I would appreciate any help and walking me through to get this fixed.
Thank you.
 
Back
Top