Php 文件\u放置\u内容无法打开流:没有此类文件或目录,请安装
我从bitbuket克隆了一个laravel项目。同时运行所有必要的命令以获取所有供应商文件,如:Php 文件\u放置\u内容无法打开流:没有此类文件或目录,请安装,php,laravel,Php,Laravel,我从bitbuket克隆了一个laravel项目。同时运行所有必要的命令以获取所有供应商文件,如: composer dump-autoload composer install php artisan cache:clear php artisan clear-compiled 还删除了文件/public_html/bootstrap/cache/config.php 但当我尝试启动该项目时,我遇到了以下错误: 文件内容(C:\xampp\htdocs\laravelstart\storag
composer dump-autoload
composer install
php artisan cache:clear
php artisan clear-compiled
还删除了文件/public_html/bootstrap/cache/config.php
但当我尝试启动该项目时,我遇到了以下错误:
文件内容(C:\xampp\htdocs\laravelstart\storage\framework/sessions/srpb1a6bkrshhh8par2fxvecch4dayclxgo4b8m):
无法打开流:没有这样的文件或目录
尝试以下命令:
php-artisan-config:cache
清除项目的配置缓存。问题可能是您克隆了它,并且没有为新服务器准备配置:)请尝试以下命令:php artisan config:cache
清除项目的配置缓存。问题可能是您克隆了它,并且没有为新服务器准备配置:)rm-rf bootstrap/cache/config.php(删除)
php artisan config:cacherm-rf引导/cache/config.php(删除)
php artisan config:cache如果清理缓存不起作用(例如在docker下运行时可能会发生这种情况),请再次尝试
chmod 755存储引导/cache
。如果清理缓存不起作用(例如,在docker下运行时可能会发生这种情况),请再次尝试chmod 755存储引导/cache
。它对我很有效cd
到您的/storage/framework/cache/data
或/storage/framework/sessions
或framework
文件夹中的任何目录,然后键入ls-la
,您可能会看到如下内容:
drwxr-sr-x 3 apache apache 16 Oct 16 13:00 bd
drwxr-sr-x 3 apache apache 16 Oct 16 17:38 be
drwxr-sr-x 3 root apache 16 Oct 17 05:00 bf
drwxr-sr-x 3 apache apache 16 Oct 16 13:07 c6
drwxr-sr-x 3 root apache 16 Oct 16 16:15 d3
drwxr-sr-x 3 apache apache 16 Oct 17 12:32 dd
drwxr-sr-x 3 apache apache 16 Oct 17 12:32 e2
drwxr-sr-x 3 root apache 16 Oct 16 16:00 e9
drwxr-sr-x 3 apache apache 16 Oct 16 21:25 f6
drwxr-sr-x 3 apache apache 16 Oct 16 16:56 f8
drwxr-sr-x 4 apache apache 26 Oct 17 06:00 fa
如您所见,某些目录归root
所有,要将此cd
修复到存储
目录并运行:
(首先检查您需要的user:group
,对于AWS,它可能是ec2用户:apache
):
每次将更改从repo推送到
/storage/framework/cache/data
或/storage/framework/sessions
或/framework/sessions
文件夹中的任何目录并键入ls-la
时,您可能会看到以下内容:
drwxr-sr-x 3 apache apache 16 Oct 16 13:00 bd
drwxr-sr-x 3 apache apache 16 Oct 16 17:38 be
drwxr-sr-x 3 root apache 16 Oct 17 05:00 bf
drwxr-sr-x 3 apache apache 16 Oct 16 13:07 c6
drwxr-sr-x 3 root apache 16 Oct 16 16:15 d3
drwxr-sr-x 3 apache apache 16 Oct 17 12:32 dd
drwxr-sr-x 3 apache apache 16 Oct 17 12:32 e2
drwxr-sr-x 3 root apache 16 Oct 16 16:00 e9
drwxr-sr-x 3 apache apache 16 Oct 16 21:25 f6
drwxr-sr-x 3 apache apache 16 Oct 16 16:56 f8
drwxr-sr-x 4 apache apache 26 Oct 17 06:00 fa
如您所见,某些目录归root
所有,要将此cd
修复到存储
目录并运行:
(首先检查您需要的user:group
,对于AWS,它可能是ec2用户:apache
):
每次从repo推送更改时,您可能希望在部署脚本中包含此内容。转到目录
laravel/bootstrap/cache
并删除config.php文件。转到目录laravel/bootstrap/cache
并删除config.php文件。您能解释一下您的错误并输入您的编码吗示例您已经尝试了一个可能的解决方案,请更详细地阐述您的问题。可能重复的您是否尝试在重新加载页面之前清除缓存,然后清除本地缓存?可能重复的嘿,我知道这是一个很长的时间。你能告诉我你是如何解决这个问题的吗?你能解释一下你的错误并把你的编码样本放在上面吗?你已经尝试了一个可能的解决方案,请详细说明您的问题。可能重复的您是否尝试过在重新加载页面之前清除缓存,然后清除本地缓存?可能重复的嘿,我知道这已经是很长时间了。你能告诉我你是如何解决这个问题的吗?我解决了,但问题没有解决我解决了,但问题没有解决我解决了,但问题没有解决。try php artisan config:clear php artisan cache:clear php artisan config:cachei解决了,但是问题没有解决try-php-artisan-config:clear-php-artisan-cache:clear-php-artisan-config:cache