rameshreddy2294's avatar

I am getting "This page isn’t working. localhost is currently unable to handle this request. HTTP ERROR 500"

// Routes Route::get('profile','StorytellerController@getProfilePage');

//Controller

0 likes
15 replies
neilherbertuk's avatar

Hi rameshreddy2294,

Are you getting this error with every request? Check your http error logs as that will tell you whats causing the issue.

If it's not making much sense, make sure the log doesn't contain any passwords but share it with me via https://paste.laravel.io/

Neil

rameshreddy2294's avatar

Hey Neil Thanks for responding. Actually nothing is getting stored in log file. Webpage it self is not loading and giving the error in the browser.

rameshreddy2294's avatar

My error Appeared like this in the browser. Log file is not getting updated with any extra data as well. In fact if i use \Log::info() then also i am getting this error.

neilherbertuk's avatar

500 errors won't appear in your laravel.log file, you will need to check the http error logs for your server.

rameshreddy2294's avatar

[Thu May 25 13:36:09.016131 2017] [core:notice] [pid 46511] AH00094: Command line: '/Applications/XAMPP/xamppfiles/bin/httpd -E /Applications/XAMPP/xamppfiles/logs/error_log -D SSL -D PHP'

This is the error recorded in the error_log file of server

ahuggins's avatar

What local server are you using?

php artisan serve

Homestead

Valet

Wamp, Mamp, Xampp, Ampps?

rameshreddy2294's avatar

XAMPP IN MAC

If I use Log::Info() code line for that also I am getting the same error. And when i try to get some data from the database table I am getting the same error ...

ahuggins's avatar

Is this the only site on the server? Can you visit the other ones?

This looks like your local server is not running.

ahuggins's avatar

what's the url you are trying to access?

rameshreddy2294's avatar
Level 6

I have other sites as well. For those I am not facing any error like this. For this only site I am getting this error that too for the selected routes and selected model classes!

Url: http://localhost/abs/public/profile

I have database table as "user_profiles" and i have created Model class as UserProfile and given protected $table = "user_profiles";

When i have used that model in the controller for getting data from that table and return view('modules.profile')->withData($this->data); I am getting this error.

But if i comment out this line $this->data->profile = UserProfile::get(); then everything working fine. Also when i tried to use Log::info() then also i am getting the error.

Jaytee's avatar

Check that an infinite loop isn't occurring in all of the files relating to the route. I'm pretty sure I had this same error a while back as I was looping indefinitely.

rameshreddy2294's avatar

Thanks every one, the problem got solved. The actual problem is due to the created_at, updated_at and deleted_at fields not added to database.

Thank you so much for all all who tried to help me. Have a great time.

Please or to participate in this conversation.