Skip navigation
Currently Being Moderated

login script Warning error session_start()

Apr 13, 2012 7:10 AM

I have used the login behavior in dreamweaver and when i run the page it give the following error

 

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/users1/jonfort/public_html/think/beta/index.php:263) in/usr/users1/jonfort/public_html/think/beta/index.phpon line 474

 

 

i have looked at the error line   session_start();

 

the rouble is the form is in a template and used across the whole site. i have placed the php in the body of the page so it will carry across all the pages and the error is pointing to the line that is locked

 

has anyone else had this problem and how do you overcome it

 

 

thanks in advance

 
Replies
  • Currently Being Moderated
    Apr 13, 2012 7:56 AM   in reply to Jonathan Fortis

    Cannot send session cache limiter - headers already sent (output started at /usr/users1/jonfort/public_html/think/beta/index.php:263) in/usr/users1/jonfort/public_html/think/beta/index.phpon line 474

    This says that you have already had an output which started on line 263.

     

    If you have a look here http://forums.adobe.com/message/4332163#4332163 you will see that I placed the session_id and session_start at the very top of the page when no output has occurred.

     

    session_start() must be repeated on each page that requires the session variables.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2012 9:39 AM   in reply to Jonathan Fortis

    Is 'userid' text or an integer?

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2012 10:17 AM   in reply to Jonathan Fortis

    The problem is not with the data.  Quite simply the function is not defined.  DW usually puts some code like:

     

    if (!function_exists("GetSQLValueString")) {

    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

      if (PHP_VERSION < 6) {

        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

      }

    Up at the top of the PHP file and that is missing from yours.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points