|
Joined: Mar 2002
Posts: 147
Member
|
Member
Joined: Mar 2002
Posts: 147 |
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).
|
|
|
|
Joined: Mar 2002
Posts: 147
Member
|
Member
Joined: Mar 2002
Posts: 147 |
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?
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
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]]]]])
|
|
|
|
Joined: Mar 2002
Posts: 147
Member
|
Member
Joined: Mar 2002
Posts: 147 |
It is currently set at 1036800. Which I believe is the default since I have not changed it.
|
|
|
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
Im getting exactly the same problem, amongst many others, so if anyone knows why please explain.
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
Joined: May 1999
Posts: 3,039 |
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']}");
UBB.threads Developer
|
|
|
|
Joined: Mar 2002
Posts: 147
Member
|
Member
Joined: Mar 2002
Posts: 147 |
It turns out that fixed it. []/forum/images/icons/grin.gif[/] Thanks.
|
|
|
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
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.
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
Joined: May 1999
Posts: 3,039 |
That line never worked off of a variable. It was just a "" because it's only a temporary cookie.
UBB.threads Developer
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Since the PHP doc says that the third parameter is int, should it be 0 rather than "0"? Or does it not matter?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|