Vote function not working Vote function not working
 

News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

Vote function not working

Started by eric.com.my, May 07, 2006, 05:00:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eric.com.my

Hi there,

My vote function is not working anymore once I had upgraded from 1.33 --> 1.44 --> 1.45 I only notice it yesterday when I want to vote once of my picture. Can someone please help me how to troubleshoot this problem.

Thank you and have a nice day.

Joachim Müller

link and non-admin test user account please.

eric.com.my

Hi there,

Thanks for your reply and below are the info that you wanted

Link http://wschooy.homeip.net/photo/
Username : test
password : password

Thank you and have a nice day.

Joachim Müller

Voting on http://wschooy.homeip.net/photo/displayimage.php?pos=-444 ("Rate this file  (current rating : 4.5 / 5 with 2 votes)") indeed didn't work for me. It may be related to the fact that you're self-hosted and the cookies aren't set properly, or you don't send the referer. To find out, temporarily edit ratepic.php with a plain text editor, find// If user does not accept script's cookies, we don't accept the vote
if (!isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
    header('Location: displayimage.php?pos=' . (- $pic));
    exit;
}

// If referer is not displayimage.php we don't accept the vote
if (!eregi("displayimage",$_SERVER["HTTP_REFERER"])){
    header('Location: displayimage.php?pos=' . (- $pic));
    exit;
}
and replace with// If user does not accept script's cookies, we don't accept the vote
if (!isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
    echo 'cookie not accepted';
    die;
}

// If referer is not displayimage.php we don't accept the vote
if (!eregi("displayimage",$_SERVER["HTTP_REFERER"])){
    echo 'referer not sent';
    die;
}

eric.com.my

Hi there,

It's the 'cookie name' in the config menu was set wrongly. Had changed it and working just fine.

Thank you very much and have a nice day. (https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwschooy.homeip.net%2Fguestbook%2Fimg%2Fsmilies%2Fnotworthy.gif&hash=2b47e428138ae7cab09593f89aff3932b5530420)