1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

[NEED HELP] Warning: Cannot modify header information - headers already sent by Read

Discussion in 'Pemrograman Web' started by yogasectio, May 16, 2013.

  1. yogasectio

    yogasectio Hero

    Joined:
    Oct 10, 2011
    Messages:
    637
    Likes Received:
    55
    Location:
    bandung
    Gan ada yang bisa tolong ane ngasih solusi untuk

    Warning: Cannot modify header information - headers already sent by (output started at /home/marryyou/public_html/wp-includes/comment-template.php:4) in/home/marryyou/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.phpon line88

    Ane dah ubek2 google terus dah praktek buat ngesolvenya sendir.. udah di check config.phpnya.. dll..

    Dari kemarin web ane ini ada2 aja.. ane juga bingung kenapa bisa kyk gini, pertama kena mass deface sama hacker indo yg pengen nyari nama, akun kena suspend gara2 high cpu (AIO seo pack) padahal sebelum ganti hosting nyantai aja.. skrg ini yg warning blablabla..

    kepala ane dah panas banget.. klo ane masih mampu untuk ngesolve masalah ini pasti ane gk akan buka thread..

    bagi mastah2 php jika berkenan menolong ane.. terima kasih.. :)
     
  2. cahmedan

    cahmedan Super Hero

    Joined:
    Oct 2, 2012
    Messages:
    1,022
    Likes Received:
    99
    Location:
    Medan
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    Boleh bisikin blognya Mas.... itu hostingnya dimana?
     
  3. ilmansg

    ilmansg Ads.id Starter

    Joined:
    Jun 22, 2012
    Messages:
    70
    Likes Received:
    3
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    perlu di check comment-template.php: line 4 dan wp-cache-phase2.php: line 88
    kalo bekas ke hack, kemungkinan masih ada sisa kode sampahnya di file tsb
     
  4. mp3online

    mp3online Super Hero

    Joined:
    Jul 19, 2011
    Messages:
    2,228
    Likes Received:
    294
    Location:
    jakarta
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    error kayak gitu biasanya karena php header ditaruh setelah html digenerate.

    di sebagian server ada yg cuma nungul warning tapi scriptnya masih berfungsi, ada juga yg nungul warning n script gak berfungsi sebagaimana mustinya.

    coba diumpetin warningnya pake
    PHP:
    error_reporting(0);
    taruh di bagian paling atas di 2 file tersebut.

    kalau scriptnya bisa berfungsi berarti gak perlu edit script.

    tapi kalau scriptnya tetep gak berfungsi dengan baik ya harus diedit php headernya termasuk setcookie hrs dipindah sebelum generate html
     
  5. yogasectio

    yogasectio Hero

    Joined:
    Oct 10, 2011
    Messages:
    637
    Likes Received:
    55
    Location:
    bandung
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    thanks ya yang udah ngasih masukan.. skrg blog ane di suspend gara2 AIO seo packnya katanya crash sama plugin lain.. ane juga gk ngerti kenapa bisa begini.. efek sehabis di hack kah? atau hostingnya gak kuat kah? gak tau saya juga..

    sebelumnya saya hosting aman2 aja.. tp saya gak menyalahkan siapa2.. mungkin saya aja yang harus lebih belajar.. Thanks for all.. thanks for ads-id.com
     
  6. mp3online

    mp3online Super Hero

    Joined:
    Jul 19, 2011
    Messages:
    2,228
    Likes Received:
    294
    Location:
    jakarta
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    saran buat temen2 yg lain.
    kalau error reportingnya masih enable sebaiknya dimatiin dari php.ini atau lewat htacces

    atau dari script php nya dengan menambah error_reporting(0);

    kalau warning semacam yg diposting oleh ts muncul di halaman web, itu malah akan bisa jadi celah keamanan.

    hacker jadi tau root folder directive nya, bahkan mungkin jadi tau username cpanel/ftp nya (contoh punya ts kemungkinan username cpanelnya marryyou)
     
  7. myrazel

    myrazel Newbie

    Joined:
    Aug 12, 2011
    Messages:
    3
    Likes Received:
    1
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    fungsi header() diletakan di paling atas.

    atau ga pake ob_start()
     
  8. mp3online

    mp3online Super Hero

    Joined:
    Jul 19, 2011
    Messages:
    2,228
    Likes Received:
    294
    Location:
    jakarta
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    gak ditaruh paling atas jg gpp boss, yg penting ditaruh sebelum echo kode html

    gak cuma header(),
    setcookie() kalau ditaruhnya setelah echo html juga akan keluar warning kayak gitu.

    yg repot lagi kalau mau naruh paling atas tapi make skripnya diinclude dlm skrip lain misal diinclude dlm index.php ditaruh dlm body html :)

    satu2nya cara yg paling gampang ya matiin error reportingnya
     
  9. gudel

    gudel Ads.id Pro

    Joined:
    Dec 13, 2012
    Messages:
    269
    Likes Received:
    24
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    Jajal km pake ini. Smua scriptq jrg yg rewel soal bginian.

    Code:
    <?php
    ini_set('display_errors','OFF');
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
    ini_set('max_execution_time', 300); //300 seconds = 5 minutes
    
    //Your Content
    .............
    ?>
    
    Hrsnya smua notifikasi g nungul maneh. Ntar klo ngecek error e msti lwt error log. Krn aslinya error msh ada, cm d kamuflase sj. Hati2 dg script yg ada error nya. Krn slain bs mbebani server jg bs jd celah spt yg d katakan pak ogah a.k.a @mp3online td.
     
  10. mp3online

    mp3online Super Hero

    Joined:
    Jul 19, 2011
    Messages:
    2,228
    Likes Received:
    294
    Location:
    jakarta
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    biar lebih jelas mengenai error reporting
    Code:
    http://php.net/manual/en/errorfunc.configuration.php
    
    http://php.net/manual/en/function.error-reporting.php
    kalau mau disable dari htaccess, mungkin yg ini bisa buat referensi
    Code:
    http://perishablepress.com/advanced-php-error-handling-via-htaccess/
     
  11. sendok.ajaib

    sendok.ajaib Ads.id Starter

    Joined:
    Apr 19, 2012
    Messages:
    73
    Likes Received:
    2
    Re: [NEED HELP] Warning: Cannot modify header information - headers already sent by

    ada script samphnya deh kyknya, ato jangan2 di hack [-(
     

Share This Page