简体   繁体   English

Laravel 8.0 Nexmo-Bridge 警告

[英]Laravel 8.0 Warning with Nexmo-Bridge

i have a problem since upgrading to laravel 8.0 with vonage/Nexmo.自从使用 vonage/Nexmo 升级到 laravel 8.0 后,我遇到了问题。 The website still works but CronJobs doesn't work (because of the Warning probably?).该网站仍然有效,但 CronJobs 不起作用(可能是因为警告?)。

Here is the Warning that appears in the Apache Error log:这是出现在 Apache 错误日志中的警告:

Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect.收到错误“PHP 消息:PHP 警告:file_exists():open_basedir 限制生效。 File(/autoload.php) is not within the allowed path(s): (/home/webapps/preprod/:/var/lib/php/session:/tmp) in /home/webapps/preprod/vendor/vonage/nexmo-bridge/src/Autoloader.php on line 69文件(/autoload.php) 不在允许的路径中:/ home/webapps/preprod/vendor/vonage/中的 (/home/webapps/preprod/:/var/lib/php/session:/tmp) nexmo-bridge/src/Autoloader.php 在第 69 行

My composer.json: "require": { "php": "^7.3|^8.0", "guzzlehttp/guzzle": "^6.3.1|^7.0.1", "nexmo/laravel": "^2.4.1", "vonage/nexmo-bridge": "^0.1.0" (this one was added after upgrading but the problem is still there)我的作曲家.json: "require": { "php": "^7.3|^8.0", "guzzlehttp/guzzle": "^6.3.1|^7.0.1", "nexmo/laravel": "^2.4. 1", "vonage/nexmo-bridge": "^0.1.0" (这个是升级后添加的,但问题依旧)

I have tried to add the folder to the open_dir directory, but the warning is still there.我试图将文件夹添加到 open_dir 目录,但警告仍然存在。

Can anyone point me in the right direction?谁能指出我正确的方向? Or is it possible to make Cronjob ignore the Warnings?或者是否可以让 Cronjob 忽略警告?

Thank you谢谢

After removing line 69 everything works.删除第 69 行后,一切正常。 I had wrong php version on server too (so i had to update that too).我在服务器上也有错误的 php 版本(所以我也必须更新它)。

I will retry later if the error is still there with the good php version.如果使用好的 php 版本仍然存在错误,我将稍后重试。

Thanks @PatrickSVL, could you keep this updated as I can raise an issue with the Laravel bridge if it isn't the environment and is the actual library causing the issue.感谢@PatrickSVL,您能否保持更新,因为如果 Laravel 桥不是环境并且是导致问题的实际库,我可以提出问题。

It does look from the error messages that it's not the library though.它确实从错误消息中看出它不是库。 If the Autoload file is wrong, you might want to run composer dump-autoload to recreate the cache.如果 Autoload 文件错误,您可能需要运行composer dump-autoload来重新创建缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM