Jump to content

Setcookie error


nawad24

Recommended Posts

I am getting this error on our website and have no clue how to fix it.  Any help would be very much appreciated!

 

Warning: setcookie() expects parameter 3 to be long, string given in /home/cust1/usr1127/html/management/lib/session/session.lib on line 50

 

this is line 50:

 

 

function storeNewCookie($session_id) {

setcookie ($this->cookie_name, $session_id, $this->cookie_expire_length);

}

Link to comment
Share on other sites

do  var_dump

function storeNewCookie($session_id)
{
      var_dump($this->cookie_expire_length);
      die;
      setcookie ($this->cookie_name, $session_id, $this->cookie_expire_length);
   }

 

see whats returned..

 

this may fix it (its a total guess)

function storeNewCookie($session_id)
{
      $x = (int)$this->cookie_expire_length;
      $x = time()+$x;
      setcookie ($this->cookie_name, $session_id, $x);
   }

 

 

Link to comment
Share on other sites

thanks!  the error message no longer appears.  i have another issue though but i am not sure if i can explain it correctly, or even if this is the right place for it. 

 

we use a cms system on our website and when we get to the page where we just had the error, if you try to add another listing 

 

(http://www.goodshepherds.org/management/index.php?action=edit&new_item=1&edit_id=&newsL-sort=title)   you just get a blank page. 

 

any suggestions?  thanks so much!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.