0
votes

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..

1
Did you try php artisan config:clear and then php artisan config:cache on the server itself? - prateekkathal
I think it's some restriction in your hosting provider. May be you should contact them to ask, if they servers are compatible for Laravel - Dharma Saputra
@prateekkathal i tried both with the routes methods, but it doesnt seems to execute. - Federico
@Dharma Saputra its a free shared hosting, i even tried with another server and the same happened - Federico
@Federico Free hosting services provide very limited resources. You should definitely shift to a small paid one. - prateekkathal

1 Answers

0
votes

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