Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.