laravel安装获取密钥在ubunto OS中生成错误 [英] laravel install getting key generate error in ubunto OS

查看:137
本文介绍了laravel安装获取密钥在ubunto OS中生成错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在安装"Laravel Framework版本5.2.26",但是在ubuntu操作系统中出现密钥生成错误

user@CN43:/var/www/html/laravel_1$ php artisan key:generate

  [ErrorException]                                                             
  file_get_contents(/var/www/html/laravel_1/.env): failed to open stream: No   
  such file or directory

因此,我已经检查了目录.env文件是否存在,但.env.example文件仅存在,因此我创建了该文件,并在"php artisan key:generate"命令生效后更新了数据库名称,数据库用户名和数据库密码该密钥是在32个字符以上生成的,并且它的get [base64:somethingsstrings with 32以上字符]我认为这里存在一些安装问题.

我的laravel网站未打开.我做错了什么?

解决方案

.env.example重命名为.env并填充所有属性.

如果通过Composer安装Laravel,此文件将自动 重命名为.env.否则,您应该手动重命名文件

https://laravel.com/docs/5.0/configuration#environment-configuration

I am install "Laravel Framework version 5.2.26" but i am getting error for key generate in my ubuntu os

user@CN43:/var/www/html/laravel_1$ php artisan key:generate

  [ErrorException]                                                             
  file_get_contents(/var/www/html/laravel_1/.env): failed to open stream: No   
  such file or directory

So i have check that directory .env file is not there but .env.example file only there so i created that file and update database name, database username, database password after that "php artisan key:generate" command is worked that key was generated above 32 characters and its get [base64:somethingsstrings with above 32 characters] i think some installation issues is there.

my laravel site is not opening. what i do mistake?

解决方案

Rename .env.example to .env and fill all properties.

If you install Laravel via Composer, this file will automatically be renamed to .env. Otherwise, you should rename the file manually

https://laravel.com/docs/5.0/configuration#environment-configuration

这篇关于laravel安装获取密钥在ubunto OS中生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆