简体   繁体   中英

laravel content management system

I tried to install this CMS https://github.com/murattanriover/basecms-laravel , I followed the install instruction, I created new database and I modified database.php file with my host data and I followed these instructions:

 composer install
 php artisan key:generate
 Create a database and inform .env
 php artisan migrate to create tables
 php artisan db:seed to populate tables

But when i try to run: localhost/projectname/public/

I got the following error:

在此处输入图片说明

You need to set APP_KEY in .env

Set it to a random 32 character string OR Run php artisan key:generate in the root folder of your project. This sets a random 32 character string for the encryption key.

In config\\app.php change:

'cipher' => 'something stands here(delete it)',

to

'cipher' => 'AES-256-CBC',

If that doesn't work, you'll need to manually add the key laravel generated to your .env file.

open the console and

php artisan key:generate

then you'll get the new key

Application key [xlhF31NeOlibJcoOW9tvZg7TkHcAZI3a] set successfully.

then go to projects and

~/projects/ nano .env

Manually add the key laravel generated to your .env file

APP_KEY=xlhF31NeOlibJcoOW9tvZg7TkHcAZI3a

As you are using WAMP server, please do as follow:

  1. Open your wamp's php.ini (in my case it's in: C:\\WampDeveloper\\Config\\Php\\php.ini )

  2. Find this line and uncomment it (remove front “;”).

    From ;extension=php_sockets.dll to extension=php_sockets.dll

  3. Save file. Restart Apache.

  4. Do a php artisan key:generate .

  5. Then make sure that your config/app.php has a line as follow:

    'cipher' => 'AES-256-CBC',

Reference to WAMP specific solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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