How can I make PHP display the error instead of giving me 500 Internal Server Error

Rob

This has never happened before. Usually it displays the error, but now it just gives me a 500 internal server error. Of course before, when it displayed the error, it was different servers. Now I'm on a new server (I have full root, so if I need to configure it somewhere in the php.ini, I can.) Or perhaps its something with Apache?

I've been putting up with it by just transferring the file to my other server and running it there to find the error, but that's become too tedious. Is there a way to fix this?

awgy

Check the error_reporting, display_errors and display_startup_errors settings in your php.ini file. They should be set to E_ALL and "On" respectively (though you should not use display_errors on a production server, so disable this and use log_errors instead if/when you deploy it). You can also change these settings (except display_startup_errors) at the very beginning of your script to set them at runtime (though you may not catch all errors this way):

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

After that, restart server.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to fix an unknown internal server error (500) Nginx is giving me?

PHP code giving 500 internal server error

How can i fix internal server error?HTTP ERROR:500

IIS Giving a 500 Internal Server Error When Serving a PHP file

500 internal server error php, how to solve?

RewriteRule giving 500 Internal Server Error

how i can resolve the error "status": 500, "error": "Internal Server Error"

Unexplained PHP error (Internal Server Error 500)

PHP page is giving me error but I can't find the error

Why is this giving me an error? And how can I fix it (context error)

How can i resolve the "HTTP Status 500 - Internal Server Error" in my web service app on glassfish?

Basic PayPal Checkout Button giving a 500 internal server error in Firefox

500 Internal Server Error can't access

POST 500 Internal Server Error -- PHP

Internal Server Error 500 on .PHP pages only

Slim PHP 500 Internal Server Error

Internal Server Error (500)

I keep getting a 500 Internal server error

500 Internal Server Error instead of 404 in Spring Boot

500 Internal Server Error returned instead of: 404 - Not Found

RewriteRule creating 500 Internal Server Error instead of 404

.htaccess getting wrong giving 500 internal error

php MySQL insert into error, 500 internal server error

Post request works when use PHP, but it fails with a 500 Internal Error when I use Axios with React, how can I fix that?

How to render 500(Internal Server Error) page using an erb instead of a static HTML in Rails?

simple AJAX JQuery example gives me 500 internal server error

500 (Internal Server Error) - jstree rendering node display spins

PHP SQL Server : 500 Internal server error with specific query

Giving me an internal error using this code. How to fix?