Results 1 to 5 of 5

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

  1. #1
    Join Date
    Dec 2007
    Location
    Santo Domingo, Dominican Republic
    Posts
    55

    Default 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

  2. #2
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default 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!


  3. #3
    Join Date
    Dec 2007
    Location
    Santo Domingo, Dominican Republic
    Posts
    55

    Default 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);


    ?>

  4. #4
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default 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!


  5. #5
    Join Date
    Dec 2007
    Location
    Santo Domingo, Dominican Republic
    Posts
    55

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

    Your are completely right. That was the problem.
    Thanks !!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •