Warning: Cannot modify header information - headers already sent by (output started a

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • VFRodriguez
    Sergeant First Class

    • Dec 2007
    • 55

    Warning: Cannot modify header information - headers already sent by (output started a

    How do I resolve this problem?
    Warning: Cannot modify header information - headers already sent by (output started at
    It happens when this script is executed:
    header('Location: http://plasticsurgery.dir2biz.com') ;

    NOTE: Before the IP address of my domain was changed, it worked fine
    Victor
    My Website
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Warning: Cannot modify header information - headers already sent by (output start

    This means that there is some white (blank) line or some other output to the browser in the page code. This can have nothing to do with the IP change, it is a change in the page code. Would need more info: which page is this (link) ?
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • VFRodriguez
      Sergeant First Class

      • Dec 2007
      • 55

      #3
      Re: Warning: Cannot modify header information - headers already sent by (output start

      Actually, I have several pages with the same problem. But all of them used to work fine before the IP change.
      This is one: http://puerto-rico.dir2biz.com
      The coding is this:

      <?php
      session_start();


      $ip = $_SERVER["REMOTE_ADDR"];
      if ($_POST['verification']<>$ip) {
      EXIT("Verification NUMBER failed... go back and retry");
      }


      if (strlen($_POST['Company'])<3){
      $msg=$msg."NAME IS TOO SHORT. VERIFY. GO BACK<BR>";
      $flag="NOTOK";
      }


      if (strlen($_POST['Company'])>40){
      $msg=$msg." Name can not be more than 40 characters<BR>";
      $flag="NOTOK";
      }
      //-------------




      $company = $_POST['Company'];
      $category = $_POST['Category'];
      $address= $_POST['Address'];
      $telephone = $_POST['Telephone'];
      $fax = $_POST['Fax'];
      $city = $_POST['City'];
      $zip = $_POST['Zip'];
      $email = $_POST['Email'];
      $url = $_POST['url'];
      $date = date('Y-m-d');






      $hoy_mas_30= mktime(0,0,0,date("m"),date("d")+30,date("Y"));
      $hoy_mas_30=date("Y/m/d", $hoy_mas_30);






      //echo sumaDia($hoy,$duracion,$hoy_mas_30);
      echo "<br>";






      //=== AQUI SE LLAMA EL CONFIG =========
      include('config.php');
      //==== FIN LLAMADO CONFIG ============

      $con = mysql_connect($dbservername,$dbusername,$dbpasswor d);
      mysql_select_db($dbname, $con);





      mysql_query("INSERT INTO prfaxdir (company,telephone,fax, address,city, zip, email,url, ip,date,category) values ('$company','$telephone','$fax','$address','$city' ,'$zip', '$email','$url', '$ip','$date','$category')");








      header('Location: http://puerto-rico.dir2biz.com') ;


      mysql_close($con);


      ?>
      Victor
      My Website

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: Warning: Cannot modify header information - headers already sent by (output start

        I believe your issue is here:

        //echo sumaDia($hoy,$duracion,$hoy_mas_30);
        echo "<br>";

        delete echo "<br>"; or preceed it with //

        It causes output to the browser thus creating the issue.
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • VFRodriguez
          Sergeant First Class

          • Dec 2007
          • 55

          #5
          Re: Warning: Cannot modify header information - headers already sent by (output start

          Your are completely right. That was the problem.
          Thanks !!
          Victor
          My Website

          Comment

          Working...
          X