Hello,
I have a problem caused by the open_basedir restriction that I cannot seem to solve. My website's structure is as follows:
root
├─ app
| └─ PHP files that are `require`d by `index.php`
├─ public [DOCUMENT ROOT]
| └─ index.php
Now, as I mention above, I require files from index.php that are located in /root/app. However, since the document root is at /root/public, I cannot do this because of the restriction that is in place. With the current setting for open_basedir I can only access files in the document root and in some other directory.
Note that this structure is quite common, and so I think it is strange I cannot allow for this. Exposing the PHP files to the internet might pose a security risk.
P.S.: Funnily, the open_basedir was unset initially, completely removing the restriction. However, the PHP version was 7.3, and I needed PHP 8. So sadly when updating the PHP version I could not leave the open_basedir setting unset.