Open pgdavidApodis opened 3 years ago
I meet the same problem.
Same issue
+1 Same issue. Your solution fixes it, someone please merge this in.
Hello KRens, how did you users/change this to get it working. I have this error 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/ and dont know how to get this fixed if you could please help.
Thank you,
THe first post written by pgdavidApodis contains the solution already. Just replace 1 line of code in src/Autoload.php:
if (file_exists(getenv('COMPOSER_VENDOR_DIR') . '/autoload.php')) {
with:
if (getenv('COMPOSER_VENDOR_DIR') && file_exists(getenv('COMPOSER_VENDOR_DIR') . '/autoload.php')) {
Thank you @KRens. It did the trick. I added it to the autoloader.php because there were no if conditions in autoload.php.
This has been fixed by #2, so the issue can be closed.
When COMPOSER_VENDOR_DIR is not set (it is not by default), the package generates a php warning, if php open_basedir configuration is set.
Existance of COMPOSER_VENDOR_DIR should be checked first in src/Autoload.php
First check should be replaced with :