• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Posts tagged headers

WebDev> Fixing Warning: “Headers already sent” & “Cannot modify header information”

Mar24
2012
Written by Scott Rowley

Eventually in your web development you may run into one of these annoying errors. What it typically means is that your browser is being sent some HTML before the PHP command header() and it’s causing your issue.

Unfortunately there is no easy way to go about troubleshooting this other than following the logic through your code, hopefully you’ve saved & tested recently and have a fairly short code to go troubleshooting with. In video games I learned early on to “Save early, save often”. I’ve since modified that to my programming so that I remember to save early, save often but also “Test early, test often”. Make little changes, then you know how much you need to go back and troubleshoot when there is an error. Anyway, another less known cause of this issue is that you’ve got the dos character ^M inserted in your code. This recently happened to me when I used FTP to download a website and then uploaded it somewhere else. Somewhere along the line my windows PC decided my perfectly fine files should have some ^M inserted into some of the files. As a result I got the “Headers already sent” error.

I’d run into the error before but I knew that I hadn’t introduced any new code so I knew it couldn’t be any html being sent before the header() function. After much googling and “facedesk”‘ing I finally found that the dos character could also cause this error. After a bit more googling I found that the easiest way to get rid of this is to simply run the following command and it will easily and quickly remove all of the dos characters (^M).

dos2unix your_messed_up_file.php

I ran this command on the file and then tried my test again and just like that I was back to normal again 🙂

Posted in Web Development - Tagged already, cannot, development, dos2unix, fix, fixed, fixing, information, modify, php, save, sent, test, troubleshoot, warning, web

osTicket> View headers for original email message

May25
2011
Written by Scott Rowley

This MOD will allow you to view the original email message headers. The headers also take alot of screen space so we have them “hidden” by default but you can click a link to expand and view them.

1.6ST: If you have not yet modified include/staff/viewticket.inc.php or scp/js/scp.js then you can simply download the following files and replace them. As always, make backups of your local files first.
Download

Hidden Shown
Hidden headers Shown headers

READ MORE »

Posted in osTicket - Tagged address, email, header, hide, Javascript, mod, modification, original, osTicket, show, ticket

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top