Jump to content

Debugging


ZulfadlyAshBurn

Recommended Posts

Does anyone knows how to create their own debugging script for php? The only thing that I am able to do now is when a user encounter an error when browsing the site, the user will still see the page but with error while an email is being send to me at the same time. Is there anyway to prevent this from happening?

Link to comment
https://forums.phpfreaks.com/topic/244498-debugging/
Share on other sites

sorry for the spelling error, *which. HAHA.

 

erm, its usually some on my local server, I can place headers somewhere in the middle of the code for redirection. but when i upload to my server, it disallows.

Did you edit your php.ini locally to have error reporting turned to the maximum?

Link to comment
https://forums.phpfreaks.com/topic/244498-debugging/#findComment-1255925
Share on other sites

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

 

i use this code?

Yes, that temporarily sets error reporting to max.  So your header calls work fine locally and not on live?

 

What does disallow mean here?

but when i upload to my server, it disallows.
Link to comment
https://forums.phpfreaks.com/topic/244498-debugging/#findComment-1255936
Share on other sites

Locally: headers(); place in middle of the page etc, it can work.

 

Online: Cannot modify header information - headers already sent by (output started at /home/***/public_html/***/index.php:9) in /home/***/public_html/***/index.php on line 186

Link to comment
https://forums.phpfreaks.com/topic/244498-debugging/#findComment-1255950
Share on other sites

Locally: headers(); place in middle of the page etc, it can work.

 

Online: Cannot modify header information - headers already sent by (output started at /home/***/public_html/***/index.php:9) in /home/***/public_html/***/index.php on line 186

Yes, that is a very common error.  So common that we even made a sticky for it, check out:

http://www.phpfreaks.com/forums/index.php?topic=37442.0

Link to comment
https://forums.phpfreaks.com/topic/244498-debugging/#findComment-1255952
Share on other sites

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.