patipat chewprecha
patipat chewprecha

Reputation: 285

laravel 5.5 HTTP ERROR 500 unable to handle this request

My old Project use Laravel 5.4.17 It can work in server normally.But new Project use Laravel 5.5.4 It can't work when route in root/public " mydomain.com/root/public is currently unable to handle this request. HTTP ERROR 500". Is it a problem with the version of php? Because current php version is 5.6.23. Laravel 5.5 require php 7.0? Do you think I'm right?

Upvotes: 3

Views: 90556

Answers (8)

Tasnim Jawad
Tasnim Jawad

Reputation: 21

Add these two lines to your index.php file to see the error.

error_reporting(E_ALL);
ini_set('display_errors', 1);

Upvotes: 2

Biobele Johnbull
Biobele Johnbull

Reputation: 21

in my case i changed hosting companies and i had to move my files to the new host. in the new host my php version was around 8.* and in the previous host it was around 7.*, i searched and did EVERYTHING! i then had a thought and reduce the version and boom that was it.

Upvotes: 0

Macdonald
Macdonald

Reputation: 964

For Laravel 8 in docker, you might want to change the permission of your storage folder.

sudo chmod -R 777 storage  

Upvotes: 1

Astro
Astro

Reputation: 901

I faced this problem too many times, the solution was to run #composer install and/or #composer update to update the composer dependencies packages, or you might even lost the .htaccess file during moving/copying the files in the live server

Upvotes: 2

Ngugi Kiarie
Ngugi Kiarie

Reputation: 1448

I had the same issue on Laravel 8, turns out the problem arose from interrupting a composer update process.

If you are in the same situation, just run composer update, that should fix it.

Upvotes: 7

Teguh Siswanto
Teguh Siswanto

Reputation: 1

I use Manjaro Linux. I installed Apache, MySQL, Php, PhpMyAdmin separately (not using lampp)

this issue "localhost is currently unable to handle this request" appears because we have to enable display_error in the php configuration located at

/etc/php/php.ini

switch display error to on

display_errors = On 

and

display_startup_errors = On

then restart apache server

sudo systemctl server restarting httpd

then information about the error will appear in your browser

Upvotes: 0

Ajai
Ajai

Reputation: 2536

I hope, You already do this.

  • You should change those public facing permissions to 644.
  • Change the Storage folder permission to 777.
  • Check the logs.
  • Make sure you configured nginx properly and then restart nginx.
  • Should you be sure the APP_KEY is in the .env file.
  • You should run php artisan config:clear after any changes to .env.

Upvotes: 9

Vision Coderz
Vision Coderz

Reputation: 8078

For Laravel 5.5 you need following server requirement

The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine, so it's highly recommended that you use Homestead as your local Laravel development environment.

However, if you are not using Homestead, you will need to make sure your server meets the following requirements:

PHP >= 7.0.0
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension

Ref: https://laravel.com/docs/5.5#server-requirements

Upvotes: 6

Related Questions