昨夜、ウィジェットを含むテーブルソーター スクリプトを更新し、サイトで深刻な問題が発生し始めました。すべてのエラー/警告/通知は、jquery.cookie.js スクリプトを指しています (Github サイトからアップグレードする前と後の両方です。これは、私の php-errors.log ファイルからの抜粋です。
[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
私の header.php ファイルからの関連行:
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));
そして、私のサイトのエラーでいっぱいの画面:
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
<head>
setcookie 行の前に自分のセクションしかないのに、ヘッダーが送信されていると PHP が不平を言うのはなぜですか? .js ファイルの 1 つが画面に何かを出力しますか? 最新のアップグレードから、私は含めています:
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
それで、私はそれを言って、以前使用していたバージョンにダウングレードしました....
さて、私は新しいバージョンであまりにも多くの問題を抱えていたので、完全に機能していた古いバージョン 2.0.5b にダウングレードしました。新しい「repeatHeaders」ウィジェットをまとめた後でも。新しい CSS ファイルを削除し、古い JS スクリプトをサイトにコピーして、新しいバージョンの痕跡を残さないようにしました。突然、古いバージョンがソートされなくなりました!!! ヘッダーは問題なく変更されますが、実際のテーブルの並べ替えには何もありません。何が起きてる????コンソールの内容は次のとおりです。お願いします。すぐに助けが必要です。これは、ミッション クリティカルなアプリを備えた PRODUCTION サーバーです。