laravel开发的程序上传附件突然报错:ErrorException: is_dir(): open_basedir restriction in effect. File(/goods) is not within the allowed path(s)
1. 运行环境#
宝塔 LNMP
1). 当前使用的 Laravel 版本?#
8.83.27
2). 当前使用的 php/php-fpm 版本?#
PHP 版本:8.0.26
php-fpm 版本:
2. 问题描述?#
laravel 开发的程序突然报错,调试器 POST 请求显示 500,具体的错误如下:
ErrorException: is_dir(): open_basedir restriction in effect. File(/goods) is not within the allowed path(s): (/www/wwwroot/www.abc.com/:/tmp/) in file /www/wwwroot/www.abc.com/vendor/symfony/http-foundation/File/File.php on line 126
网上找了很多教程,比如关闭宝塔的防跨站,以及设置 open_basedir 都没有效果,关闭防跨站,就会提示不能创建相关目录,问题是我的目录本来就存在,且权限也都给了。
都不行,其他办法也试过了,前几天一直正常的,系统没有任何操作,就突然这样了。
推荐文章: