Getting an error after I login leave and then come back......
Warning: setcookie() expects parameter 3 to be long, string given in C:\inetpub\wwwroot\mywebsitesdir\ubbt\ubbt.inc.php on line 1619
[]/forum/images/icons/confused.gif[/]
Cleared all my cookies. Went to the Main index page (no error). Logged in (no error). Left and came back to the Main Index (recieved error above).
Parameter 3 ( I am going to assume this is line 3)= the web site.....
So my cookie for UBBDEV (line 3):
www.ubbdev.com/ My cookie for my site (line 3):
www.unnecessaryroughness.com/ Any thing to do with the length of the domain name?
The third parameter to set_cookie() is the expires value. I assume that's the value in seconds specified in the admin settings. What value are you using?
int setcookie ( string name [, string value [, int expire [, string path [, string domain [, int secure]]]]])
It is currently set at 1036800.
Which I believe is the default since I have not changed it.
Im getting exactly the same problem, amongst many others, so if anyone knows why please explain.
It turns out that the time should never just be left blank, instead use a zero, so that line on 1619 should look like this:
setcookie("w3t_mysess","$newsessionid","0","{$config['cookiepath']}");
It turns out that fixed it.
[]/forum/images/icons/grin.gif[/]
Thanks.
So basically your saying hardcode that and prevent it using the variable, isnt there anyway it can be made to work with the variable. If this was in my native programming language im sure it would be pretty easy.
That line never worked off of a variable. It was just a "" because it's only a temporary cookie.
Since the PHP doc says that the third parameter is int, should it be 0 rather than "0"? Or does it not matter?