0

I had php 5.6 which I unistall and put laravel 7.3 and then 7.2 and now 7.1. After fresh xampp and composer installation I run the project, It give me 500 internal error in the console which points to index.php. I'm just trying to run a project downloaded from git. Can't run Laravel, phpmyadmin is working.

I also checked the log file.It says..

[2020-04-12 19:48:50] production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in D:\xampp\htdocs\hrm-master\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php:43 Stack trace:

0 D:\xampp\htdocs\hrm-master\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php(27):

Illuminate\Encryption\Encrypter->__construct('', 'AES-256-CBC')

1 D:\xampp\htdocs\hrm-master\vendor\laravel\framework\src\Illuminate\Container\Container.php(746):

Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption{closure}(Object(Illuminate\Foundation\Application), Array)

My xampp controll panel is showing 'x' mark under service module, so I think I havent installed xampp correctly, but then other non laravel project and phpmyadmin is working fine. What might be the issue?

  • I think you need to generate a key. [Does this help at all?](https://stackoverflow.com/questions/33370134/when-to-generate-a-new-application-key-in-laravel) – segFault Apr 12 '20 at 12:57

1 Answers1

1

Try to run

php artisan key:generate
php artisan confg:cache
Quantumass
  • 826
  • 6
  • 11
  • I had other problem maybe xampp was not installed properly, untill I reached to this error, In php 7.3 I was getting count() expects parameter to be an array ..something like this.. untill I reach above error and your solution is working . thanks. – bilal malik Apr 12 '20 at 13:06
  • you should change it to sizeof since in php 7 it will throw this warning or ignore that error with @ – Quantumass Apr 12 '20 at 13:14
  • Yes but also read that we should not do changes in vendor folder – bilal malik Apr 12 '20 at 13:23
  • No I didn't say change the vendor folder, if the problem is inside the vendor add `error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);` on the constructor of the contoller – Quantumass Apr 12 '20 at 13:37
  • Yes, but then which controller? Its not even loading index.php, how will it even reach controller? – bilal malik Apr 12 '20 at 14:20
  • check this out https://stackoverflow.com/questions/44806474/disable-error-reporting-entirely-in-laravel-production – Quantumass Apr 12 '20 at 14:48