Cacti 0.6.8 - setcookie() Problem

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

Moderators: Developers, Moderators

Post Reply
ericr
Posts: 18
Joined: Wed May 15, 2002 4:30 pm

Cacti 0.6.8 - setcookie() Problem

Post by ericr »

I just installed Cacti this afternoon to evaluate as an alternative to using Cricket (looks really nice so far), and ran in to a little issue.

When attempting to Logout, I got the following error message:
""
Warning: setcookie() expects parameter 3 to be long, string given in /usr/local/cacti-0.6.8/logout.php on line 27

Warning: Cannot add header information - headers already sent by (output started at /usr/local/cacti-0.6.8/logout.php:27) in /usr/local/cacti-0.6.8/logout.php on line 28
""
So, I edited /usr/local/cacti-0.6.8/logout.php, and changed line 26 from:

setcookie(session_name(),"","","/");

To:

setcookie(session_name(),"",time() - 3600,"/");

This appears to have fixed the problem. I'm not sure if this happened due to something I goofed up or not, but I figured I'd make a quick post to let others know about it regardless.

System Details:

Slackware 8.0 Linux (2.4.17)
Apache 1.3.24 (w/ mod_php4 4.2.0 and mod_ssl 2.8.8)
Perl 5.6.1

Let me know if you'd like any additional information about my setup.
Eric Reeves
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This must be due to your newer version of PHP. I will look into making this work correctly for future versions, I usually stay away from PHP's 'setcookie' function anyways. Now I know why.

-Ian
RandomWelshBloke
Posts: 33
Joined: Mon Feb 18, 2002 7:00 pm
Location: London, UK

Post by RandomWelshBloke »

I also had this problem, thanks for the fix ericr.

RH7.2
Apache 1.3.24
php 4.2.1
perl 5.6.0

One thing though, when I use the new logout button on the top menu bar it takes me to the login screen, as you would expect, but... when i use the old logout button on the console left hand menu the screen doesnt change. I had to refresh the screen to see the login screen. ( not a major problem just a little isue)

Any ideas?

Random. :P
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests