简体   繁体   中英

Laravel Local Routes on server after deployment

My problem is that i tried to upload my project to the server (using filezilla uploaded the whole thing) and encountered this error:

"The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths."

Searching on google, people says its a key problem on .env file. But that wasn't my case. the Key is there, I even use php artisan key:generate. it's like the server isn't reading the .env file

I tried config:cache and uploaded the "config.php" that was generated inside the cache folder and now the app cant finds the "views" because the paths are not the server paths but the local ones.

I tried everything, even uploading a fresh laravel installation and again: "The only supported ciphers are AES-128-CBC.."

Also tried config:cache on the server using the routes:

Route::get('/config-cache', function() { $exitCode = Artisan::call('config:cache'); return 'done.'; });

But i get this error: " putenv() has been disabled for security reasons "

I don't really know how to proceed..

You are getting this error because you have to generate key

try

php artisan key:generate

Or generate locally then replace it with .env

APP_KEY=YourGeneratedKey

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