Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2012
    Posts
    4

    Unanswered: session cache limiter - headers already sent

    can someone please help me solving this problem, i cant seem to find the problem, says problem is in validateform on line 3

    <?php
    include_once("functions.php");
    session_start();

    function domaincheck($domain)
    {
    if (preg_match ("/^[a-z0-9][a-z0-9\-]+[a-z0-9]$/i", $domain))
    {
    return TRUE;
    }
    else
    {
    return FALSE;
    }
    }

    $_SESSION['domainurl']=$_POST['domainurl'];
    $_SESSION['estmonth']=$_POST['estmonth'];
    $_SESSION['estday']=$_POST['estday'];
    $_SESSION['estyear']=$_POST['estyear'];
    $_SESSION['monthlyrevenue']=$_POST['monthlyrevenue'];
    $_SESSION['monthlytraffic']=$_POST['monthlytraffic'];
    $_SESSION['PageViews']=$_POST['PageViews'];
    $_SESSION['domainregister']=$_POST['domainregister'];
    $_SESSION['datemonth']=$_POST['datemonth'];
    $_SESSION['dateday']=$_POST['dateday'];
    $_SESSION['dateyear']=$_POST['dateyear'];
    $_SESSION['alexarank']=$_POST['alexarank'];
    $_SESSION['googlebacklinks']=$_POST['googlebacklinks'];
    $_SESSION['yahoobacklinks']=$_POST['yahoobacklinks'];
    $_SESSION['title']=$_POST['title'];
    $_SESSION['subtitle']=$_POST['subtitle'];
    $_SESSION['Categories']=$_POST['Categories'];
    $_SESSION['listinglength']=$_POST['listinglength'];
    $_SESSION['description']=$_POST['description'];
    $_SESSION['paymethods']=$_POST['paymethods'];
    $_SESSION['startingbid']=$_POST['startingbid'];
    $_SESSION['reserveprice']=$_POST['reserveprice'];
    $_SESSION['buyitnowprice']=$_POST['buyitnowprice'];
    $_SESSION['upgrades']=$_POST['upgrades'];

    if ($_POST['domainurl']=="")
    {
    $_SESSION['newauction_status']="Please Enter Domain Url";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if($_POST['monthlyrevenue']=="")
    {
    $_SESSION['newauction_status']="Please Enter Monthly Revenue";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['monthlytraffic']=="")
    {
    $_SESSION['newauction_status']="Please Enter Monthly Traffic";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['domainregister']=="")
    {
    $_SESSION['newauction_status']="Please Enter Domain Register";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['title']=="")
    {
    $_SESSION['newauction_status']="Please Enter Title";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['subtitle']=="")
    {
    $_SESSION['newauction_status']="Please Enter SubTitle";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['listinglength']=="")
    {
    $_SESSION['newauction_status']="Please Enter Listing Length";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['description']=="")
    {
    $_SESSION['newauction_status']="Please Enter Description";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['description']=="")
    {
    $_SESSION['newauction_status']="Please Enter Description";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['startingbid']=="")
    {
    $_SESSION['newauction_status']="Please Enter Starting Bid";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['reserveprice']=="")
    {
    $_SESSION['newauction_status']="Please Enter Reserve Price";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if ($_POST['buyitnowprice']=="")
    {
    $_SESSION['newauction_status']="Please Enter Buy It Now Price!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (domaincheck($_POST['domainurl']))
    {
    $_SESSION['newauction_status']="Invalid Domain Name";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (!is_numeric($_POST['monthlyrevenue']))
    {
    $_SESSION['newauction_status']="Monthly Revenue should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (!is_numeric($_POST['monthlytraffic']))
    {
    $_SESSION['newauction_status']="Monthly Traffic should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (trim($_POST['PageViews'])!="" && !is_numeric($_POST['PageViews']))
    {
    $_SESSION['newauction_status']="Page Views should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (trim($_POST['alexarank'])!="" && !is_numeric($_POST['alexarank']))
    {
    $_SESSION['newauction_status']="Alexa Rank should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (trim($_POST['googlebacklinks'])!="" && !is_numeric($_POST['googlebacklinks']))
    {
    $_SESSION['newauction_status']="Google Backlinks should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (trim($_POST['yahoobacklinks'])!="" && !is_numeric($_POST['yahoobacklinks']))
    {
    $_SESSION['newauction_status']="Yahoo Backlinks should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (!is_numeric($_POST['listinglength']))
    {
    $_SESSION['newauction_status']="Listing Length should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (!is_numeric($_POST['startingbid']))
    {
    $_SESSION['newauction_status']="Starting Bid should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (!is_numeric($_POST['reserveprice']))
    {
    $_SESSION['newauction_status']="Reserve Price should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }else if (!is_numeric($_POST['buyitnowprice']))
    {
    $_SESSION['newauction_status']="Buy It Now price should be a number!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }elseif (!isset($_POST['paymethods'][0]))
    {
    $_SESSION['newauction_status']="Payment Method should be chosen!";
    ?><script> window.location.href="new-auction.php"; </script> <?php
    }
    else{
    if (!isset($_POST['updateauction']))
    {
    ?><script> window.location.href="paymentdetails.php"; </script> <?php
    }else{
    ?><script> window.location.href="updatepayment.php"; </script> <?php
    }
    }
    ?>

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    headers already sentr measn that PHP cannot send the session stuff which must be the first stuff sent with the page.
    so check there is nothing being echo'd or output to the browser window before the call to session start. it could be a space or anything.

    my suspiscion is that you are sending something as part of the
    PHP Code:
    include_once("functions.php"); 
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jul 2012
    Posts
    4
    sorry but i still haven't found the problem.
    can someone help my... my php skills are very bad and the guy who wrote this is not responding now for 2 weeks.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    place the line session start5 as the first line immedaitely after the <?php line
    make cetrtain there are no spaces after the <?PHP OR before the sessions_start
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jul 2012
    Posts
    4
    Quote Originally Posted by healdem View Post
    place the line session start5 as the first line immedaitely after the <?php line
    make cetrtain there are no spaces after the <?PHP OR before the sessions_start
    I can't find start5.
    there are no spaces before php and after i checked that.
    i really appreciate your help do you have any suggestions or could you help me out ?

  6. #6
    Join Date
    Jul 2012
    Posts
    4
    i made it work.


    can someone please help me solving this problem, i cant seem to find the problem, says problem is in validateform on line 3

    <?php
    include_once("functions.php");
    session_start();

    its now

    <?php
    session_start();
    function domaincheck($domain)
    {
    if (preg_match ("/^[a-z0-9][a-z0-9\-]+[a-z0-9]$/i", $domain))
    {
    return TRUE;
    }
    else
    {
    return FALSE;
    }
    }



    is this good

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so look in the script validateform.php on line 3
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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