nawad24 Posted August 30, 2007 Share Posted August 30, 2007 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 https://forums.phpfreaks.com/topic/67301-setcookie-error/ Share on other sites More sharing options...
MadTechie Posted August 30, 2007 Share Posted August 30, 2007 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 https://forums.phpfreaks.com/topic/67301-setcookie-error/#findComment-337668 Share on other sites More sharing options...
nawad24 Posted August 31, 2007 Author Share Posted August 31, 2007 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 https://forums.phpfreaks.com/topic/67301-setcookie-error/#findComment-338584 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.