Seite 1 von 1

setcookie() expects parameter 3 to be long

Verfasst: 17.08.2004 22:37
von garfield777
guten abend zusammen,

i habe gerade phpBB 1.4.4 installiert (ja, ich weiß, schon älter, aber bitte empfielt mir jetzt nicht phpBB 2, ich will die 1.4.4er version!!)

ich habe meines wissens alles beachtet und genau nach anleitung installiert, aber es ist folgender fehler aufgetreten:
Warning: setcookie() expects parameter 3 to be long, string given in /opt/lampp/htdocs/website/functions.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/dzip/website/functions.php:72) in /opt/lampp/htdocs/website/login.php on line 66
dieser fehler ist anscheinend schon öfters aufgetreten, aber überall finde ich nur hinweise, dass man die neuere version verwenden soll :(

die einzige nützliche seite, die google gefunden hat, wurde mittlerweile gelöscht :( ...und sie war auf phpbb.de gehostet...jetzt frag ich halt nochmal nach :-)

mfg
philipp

Verfasst: 17.08.2004 22:43
von PhilippK
Wenn ich das richtig im Kopf hatte, war da was mit 'nem Parameter, den man ggf. durch Null ersetzen musste. Ist aber lang her ;-)

Poste doch mal die Zeilen 65-75 der functions.php.

Gruß, Philipp

Verfasst: 17.08.2004 22:46
von garfield777
hier die zeilen 60-75 (damit der kommentar komplett ist):

Code: Alles auswählen

/**
 * Sets the sessID cookie for the given session ID. the $cookietime parameter
 * is no longer used, but just hasn't been removed yet. It'll break all the modules
 * (just login) that call this code when it gets removed.
 * Sets a cookie with no specified expiry time. This makes the cookie last until the
 * user's browser is closed. (at last that's the case in IE5 and NS4.7.. Haven't tried
 * it with anything else.)
 */
function set_session_cookie($sessid, $cookietime, $cookiename, $cookiepath, $cookiedomain, $cookiesecure) {

	// This sets a cookie that will persist until the user closes their browser window.
	// since session expiry is handled on the server-side, cookie expiry time isn't a big deal.
	setcookie($cookiename,$sessid,'',$cookiepath,$cookiedomain,$cookiesecure);

} // set_session_cookie()

gruß philipp

Verfasst: 17.08.2004 22:55
von PhilippK
Versuch mal

Code: Alles auswählen

setcookie($cookiename,$sessid,NULL,$cookiepath,$cookiedomain,$cookiesecure);
oder

Code: Alles auswählen

setcookie($cookiename,$sessid,0,$cookiepath,$cookiedomain,$cookiesecure);
Gruß, Philipp

Verfasst: 17.08.2004 23:07
von garfield777
cool danke, hatt funktioniert 8)

gruß von philipp @ philipp :lol: