-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The only supported ciphers are AES-128-CBC and AES-256-CBC #9080
Comments
You need to follow our upgrading guide. |
No? |
@GrahamCampbell Thanks but I don't have a 'cipher' key in my config/app.php. I've added it and it works, however I didn't remove it so the upgrade guide is misleading. |
In
In my .env file I have |
You likely need to clear the config cache. |
Ok sorry.. I think |
run this command
and the clear config cache using
will solve this problem |
You should run |
The problem I encountered is in The problem is the key is empty for config and doesn't get registered, that's why the error change to and works |
Try run 'php artisan key:generate' again if you have such an issue. |
In my case, the composer do not generate .env file. So i've created it, then execute key:generate and it works! |
In my case, I just run the command |
I get this error if I refresh the page too quickly, otherwise it works fine. |
That's because you forgot to cache the config. |
use in command |
Steps to solve this problem.
|
Hi i m having the error while i running laravel. RuntimeException in compiled.php line 13231: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. |
|
In my own case the following was what worked
|
If you get this error and using artisan serve, once you fix the .env issue restart the process |
using
|
php artisan key:generate |
Edit and Delete modal window its come good, but the action it's not working... thank you on advance! |
For me, adding a new .env.testing file and running phpunit cause to this error: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. |
Thank u and it's work! |
100% Perfect and has been tested....
…On Dec 30, 2016 5:35 AM, "ShareMan" ***@***.***> wrote:
Thank u and it's work!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9080 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFDnGeBREQu5P-MfZpFq94M596LcWDWcks5rNN5wgaJpZM4E4_iU>
.
|
thank you all 100% working properly |
I've finishing another one... I'll contact sonest for you can download and
test... Please make comment con Youtube...
…On Jan 11, 2017 12:33 AM, "knuks" ***@***.***> wrote:
thank you all 100% working properly
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9080 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFDnGQz-QmJM73-fQhVq7vs2bg3DAcPmks5rRGmlgaJpZM4E4_iU>
.
|
Cache your configuration and don't use env outside your config files. Shouldn't use env in production except from config. |
Ok, I see that doing config:cache in a Laravel Application solves the problem, but in a Lumen Application the .env file seems to be the only way: https://lumen.laravel.com/docs/5.4/configuration There is no "config caching".. I've even tried to copy the config:cache artisan command, but the cached file has no effect ... Lumen is always trying to access the .env file.. Any ideas ? |
I was using 'key' => env('Wd8ixPMi0t89o+bCZHkjQvL8ljkWSLwJLPlhEArWick') instead of Besides this guide demystified my installation process |
php artisan key:generate then restart php artisan ser |
work's fine, Thanks
|
The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. laravel 5.3 I solve this my |
i have the same issue but i try |
Three things I've noticed that are bugs in this behaviour and took me a while to work out:
|
|
This is still an issue. Fresh install from yesterday (Laravel 5.4). Edit: I feel a bit dumb now. .env was not readable. Might be good to produce at least a warning when this happens 'Warning: .env exists but cannot be read' or something like that |
Hi i changed the value of the 'key' parameter in app.php for the value of the APP_KEY in the .env file like this: Thats work for me. |
@JonMadVal while that technically works, that isnt really a secure solution one of the reasons that key, along with database/service credentials are in the .env file is that they shouldnt be included in your source control, which by default at least, config files are, .env is not it would be far better to look into why it failed to read the value from .env, which is likely to either be a file permissions issue, or a caching issue (try running artisan config:clear) |
@rs-sliske for sure is not a secure solution but any of the above solutions works for me, i tried changed the permissions file, i executed the config:clear command, re-build the key but does't works. maybe the weekend i can work on it and looks for the optimal solution. If you have some idea to tried i'll glad to know it, i'm running laravel fedora. Thanks |
I have the same issue, on Laravel 5.4.*, I am getting:
and
Putting I have .env file with permissions Other than setting values directly in config files, I've tried all solutions suggested above: php artisan key:generate
php artisan config:clear with no permanent effect, the error pops up randomly, most with ajax requests (eg. uploading multiple files, where 3 of 4 files are uploaded, the 4th returns one of the errors) When I try
One think to notice, I am running these commands from a route: Route::get('/clear-fix', function() {
$this->middleware('auth');
$exitCode = Artisan::call('key:generate');
$exitCode = $exitCode == 0 ? Artisan::call('config:clear') : $exitCode;
$exitCode = $exitCode == 0 ? Artisan::call('config:cache') : $exitCode;
return $exitCode;
}); |
Mine works using this:
|
I think the cause of the problem is there is no proper key cached.
Hope it works for you. |
Here is a simplistic explanation of how this Laravel/Heroku API key business works, according to my understanding and how I managed to get it working:
I found the official documentation to be unclear. You are told to use artisan to generate a key, but my understanding is that (1) you don't need to do this because a key will have been created (by Composer) during creation of the laravel application (2) if you do use artisan to generate a key you would need to manually insert this key into the laravel .env file as well as supplying it to Heroku since it will be different from the one you currently have in .env (perhaps in some environments the artisan generate command updates .env?) |
The .env file is updated every time you run the command. The only time the key is automatically created for you is when you run "laravel new" to create an app. Anytime you clone a repo or begin a project another way, you'll need to run that command. Then, no matter what hosting service you use, you'll have to set the key on the server to match the key that was generated. |
That makes sense, and that's how I would have expected it to work, but on my (Windows) local machine running the command doesn't update the .env file. |
You need to have .env on your appication folder then run: $ php artisan key:generate $ cp .env.example .env |
The method is correct as @shakirblouch ,thanks!
then run
my version |
In my case After that i killed the old server and run again Because you should restart server after any change in .env file. |
Following commands worked for me |
add value to APP_KEY of .env file , like this: |
In my case, I'v tried everything above and didn't worked. My app was running fine until it crashed and I'v found that env file was not being readed. I was running app with php artisan serve. I stop serve and run the commands, but no solution. I'v found that you need to keep php artisan serve running and run these commands: php artisan config:clear Restart php artisan serve Thank you jay_mizray . |
i believe php artisan serve is only intended to be used for development. not for production. |
I back to this post again and again... Can be many factors, then... On non testing environments (production or develop, for example) environments:
On testing environments, also:
If the problem persists, put this before error: |
The text was updated successfully, but these errors were encountered: