Laravel 500 Error and Display Error Issue

alterions.wuaze.com

HTTP ERROR 500

I am currently experiencing a 500 error on my Laravel application hosted on InfinityFree. Unfortunately, the display error feature seems to be unresponsive, and I cannot find any log files in the storage directory for further investigation.

Could you please provide guidance on how to enable error display or retrieve error logs in this environment? Thank you.

I assume you also have APP_DEBUG set to true?

3 Likes

yes sir, i already set the APP_DEBUG to true in .env file

image

is there anything wrong with this?

also dont forget to add in your .htaccess also App_Debug=value display_errors On maybe it works

The APP_DEBUG setting only works for Laravel’s internal error handling. But then you’d also see an error page generated by Laravel. You’re getting a blank page, which I think is generated by the server before Laravel’s error handling actually takes effect.

Annoyingly, it seems that Laravel forces display_errors to be off anyways, even before it’s own error handling is setup correctly.

But unfortunately, you cannot force scripts to log their errors. If they choose to swallow all errors and not provide a (working) mechanism to show or collect them, you’ll have to debug your site without being able to see the errors.

4 Likes

Troubleshooting Server Error 500 on Laravel Web App Hosted on Infinityfree
Hello Admin,
I am a Laravel web developer and I host my Laravel web app on Infinityfree hosting. It was working fine for almost one month, but suddenly it started showing Server Error 500. I’m wondering why this error occurred because there are no errors in my code.

I wonder too. But I also don’t know why you’re having this issue. I’m not aware of any compatibility problems with Laravel 10 on our hosting, or other issues that could cause this behavior.

So I’m sorry, but you’ll have to debug this issue yourself. Your code is not working here. If it’s a server problem, we’re happy to investigate. But we need something more actionable than “it was working fine before” to know what that server problem would be.

4 Likes

Hi AmitGarg,

When dealing with PHP 500 errors, you most likely would need to check on the code syntax to see whether it is PHP 8.2 compliant, this also applies to the 3rd party libraries that you used via composer. Simply run composer update locally and replace the contents of the vendor folder, and you should be back online.

Cheers!

1 Like

Admin, thank you for your prompt response. I have already resolved this issue. It was caused by the Carbon 2.5 version, and it has been fixed in Carbon 2.6 and later versions. Therefore, I just ran the ‘composer update’ command and reuploaded the app to the hosting.

4 Likes

Thanks, bro, for your help. I already solved this problem.

1 Like

Hi AmitGarg,

No problem, please mark it as solution so others can reference in the future, thanks.

Cheers!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.