Jump to content

How do I show the errors in the browser


ballhogjoni

Recommended Posts

Solve this the easy way. Add the following two lines to your script -

 

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

 

This will show everything but fatal parse errors.

 

If you are getting fatal parse errors, they will show up in the web server log file. However, if you are just writing code and it has fatal parse errors, you should be debugging it on a local development computer and not a live server. Your code should be error free before you put it onto a live server.

Solve this the easy way. Add the following two lines to your script -

 

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

 

This will show everything but fatal parse errors.

 

If you are getting fatal parse errors, they will show up in the web server log file. However, if you are just writing code and it has fatal parse errors, you should be debugging it on a local development computer and not a live server. Your code should be error free before you put it onto a live server.

 

Yeup we already discussed this, we're displaying fatal errors :)

From the posted information, no one knows for a fact what type of errors are occurring.

 

Turning on full php error_reporting and display_errors in a .htaccess file (when php is running as an Apache server module) or in a local php.ini (when php is running as a CGI wrapper) will help more directly with debugging.

 

Code that is experiencing a problem serious enough there there is no output from it is not ready to be put onto a live server.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.