Last night, I updated my tablesorter scripts, including the widgets and starting having severe problems with my site. All the errors/warnings/notices point at the jquery.cookie.js script (both before and after I upgraded it from the Github site. Here is an excerpt from my php-errors.log file:
[16-Sep-2013 07:58:42 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\jms\header.php:73) in C:\inetpub\jms\header.php on line 80
[16-Sep-2013 07:58:42 America/New_York] PHP Stack trace:
[16-Sep-2013 07:58:42 America/New_York] PHP 1. {main}() C:\inetpub\jms\index.php:0
[16-Sep-2013 07:58:42 America/New_York] PHP 2. include_once() C:\inetpub\jms\index.php:2
[16-Sep-2013 07:58:42 America/New_York] PHP 3. setcookie(*uninitialized*, *uninitialized*, *uninitialized*) C:\inetpub\jms\header.php:80
[16-Sep-2013 07:58:42 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\jms\header.php:73) in C:\inetpub\jms\header.php on line 81
[16-Sep-2013 07:58:42 America/New_York] PHP Stack trace:
[16-Sep-2013 07:58:42 America/New_York] PHP 1. {main}() C:\inetpub\jms\index.php:0
[16-Sep-2013 07:58:42 America/New_York] PHP 2. include_once() C:\inetpub\jms\index.php:2
[16-Sep-2013 07:58:42 America/New_York] PHP 3. setcookie(*uninitialized*, *uninitialized*, *uninitialized*) C:\inetpub\jms\header.php:81
[16-Sep-2013 07:58:42 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\jms\header.php:73) in C:\inetpub\jms\header.php on line 82
[16-Sep-2013 07:58:42 America/New_York] PHP Stack trace:
[16-Sep-2013 07:58:42 America/New_York] PHP 1. {main}() C:\inetpub\jms\index.php:0
[16-Sep-2013 07:58:42 America/New_York] PHP 2. include_once() C:\inetpub\jms\index.php:2
[16-Sep-2013 07:58:42 America/New_York] PHP 3. setcookie(*uninitialized*, *uninitialized*, *uninitialized*) C:\inetpub\jms\header.php:82
[16-Sep-2013 07:58:42 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\jms\header.php:73) in C:\inetpub\jms\header.php on line 83
[16-Sep-2013 07:58:42 America/New_York] PHP Stack trace:
[16-Sep-2013 07:58:42 America/New_York] PHP 1. {main}() C:\inetpub\jms\index.php:0
[16-Sep-2013 07:58:42 America/New_York] PHP 2. include_once() C:\inetpub\jms\index.php:2
[16-Sep-2013 07:58:42 America/New_York] PHP 3. setcookie(*uninitialized*, *uninitialized*, *uninitialized*) C:\inetpub\jms\header.php:83
[16-Sep-2013 07:58:42 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\jms\header.php:73) in C:\inetpub\jms\header.php on line 84
[16-Sep-2013 07:58:42 America/New_York] PHP Stack trace:
[16-Sep-2013 07:58:42 America/New_York] PHP 1. {main}() C:\inetpub\jms\index.php:0
[16-Sep-2013 07:58:42 America/New_York] PHP 2. include_once() C:\inetpub\jms\index.php:2
[16-Sep-2013 07:58:42 America/New_York] PHP 3. setcookie(*uninitialized*, *uninitialized*, *uninitialized*) C:\inetpub\jms\header.php:84
The relevant lines from my header.php file:
setcookie('username',$uname,time()+(60*60*24*365)); // renew cookies for another year
setcookie('useremail',$umail,time()+(60*60*24*365));
setcookie('usernum',$unum,time()+(60*60*24*365));
setcookie('userlast',$ulast,time()+(60*60*24*365));
setcookie('userfirst',$ufirst,time()+(60*60*24*365));
And the screen full of errors on my site:
Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\jms\header.php:73) in C:\inetpub\jms\header.php on line 80 Call Stack: 0.0156 140272 1. {main}() C:\inetpub\jms\index.php:0 0.0156 150600 2. include_once('C:\inetpub\jms\header.php') C:\inetpub\jms\index.php:2 0.1248 6136704 3. setcookie(???, ???, ???) C:\inetpub\jms\header.php:80
Why, suddenly, is PHP complaining about headers being sent when all I have before the setcookie lines is my <head>
section? Do one of the .js files output anything to the screen? From the latest upgrade, I'm including:
js/tablesorter/css/theme.black-ice.css
js/tablesorter/jquery.tablesorter.min.js
js/tablesorter/jquery.tablesorter.widgets.min.js
js/tablesorter/hquery.widgets-filter-formatter.min.js
So, I said the heck with it and downgraded back to the version I was using before....
Well, I was having too many problems with the new version so I downgraded to my older version 2.0.5b, which was working perfectly. Even after the new "repeatHeaders" widget I put together. Now I have removed the new CSS file(s), and copied my old JS scripts back into my site, making sure not to leave any trace of the newer version. All of a sudden, my OLD version isn't sorting anymore!!! The headers change just fine but nothing in the actual tables sort. What's going on here???? Here's what the Console says. Please, I need help quickly, this is a PRODUCTION server with a mission critical app!