setcookie() error with PHP 4.2.2 and Cacti 0.6.8

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
skotten

setcookie() error with PHP 4.2.2 and Cacti 0.6.8

Post by skotten »

With RedHat 7.2 & PHP 4.2.2 i get this error:

----------------------------------

Warning: setcookie() expects parameter 3 to be long, string given in /var/www/html/cacti-0.6.8/logout.php on line 26

Warning: Cannot add header information - headers already sent by (output started at /var/www/html/cacti-0.6.8/logout.php:26) in /var/www/html/cacti-0.6.8/logout.php on line 27

-----------------------------------

Anyone know what to do ?
skotten

Post by skotten »

It seems like its a problem with the deletion of the cookie in logout.php

-------------------

setcookie(session_name(),"","","/");
header("Location: index.php");
exit;

--------------------

The problems is solved if you change "" to Time() - 3600 (1 hour ago):

setcookie(session_name(),"",time() - 3600,"/");
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I have heard this bug report from a few users so far. It will definitely be fixed for the next release. Thanks for posting the fix to the board though!

-Ian
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

FYI: I fixed this error in the 0.6.8a release. You can find more information about it and the 0.6.8 -> 0.6.8a diff here:

http://www.raxnet.net/board/viewtopic.php?t=727

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests