Voting does nothing Voting does nothing
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Voting does nothing

Started by densys, December 18, 2007, 11:04:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

densys

Hello,
I installed cpg 1.4.14 on a debian machine with apache 2.2.3, php 5.2 and mysql 5.0. Everything is working ok, even Imagemagick works. Except rating. Rating does not work at all, if you click on it, the page reloads but nothing changes. It still shows "Rate this file (No vote yet)" and no files appaer in the top rated view either (min votes for a file = 1).

The following notices are displayed after rating a picture:
/include/themes.inc.php
Notice line 2240: Undefined index: uid
Notice line 2324: Undefined variable: report_tgt
Notice line 1943: Undefined index: uid

The gallery is at http://dennis.kuhn.geek.nz.

Any help would be greatly appreciated,

Dennis

The debug output does not seem to contain the actual rating:

USER:
------------------
Array
(
    [ID] => 6194dae0d9f69e9555e354d7d4120981
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => dennis
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 1
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg14x_filetypes; (0s)
    [1] => select * from cpg14x_plugins order by priority asc; (0s)
    [2] => delete from `kuhn`.cpg14x_sessions where time<1197968333 and remember=0; (0.001s)
    [3] => delete from `kuhn`.cpg14x_sessions where time<1196762333; (0s)
    [4] => select user_id from `kuhn`.cpg14x_sessions where session_id=md5("41be5ae46d76da4e371de5c930c5e315d25c7b1a5d6a4620cc9d60b87fd939d8"); (0s)
    [5] => select user_id as id, user_password as password from `kuhn`.cpg14x_users where user_id=1 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `kuhn`.cpg14x_users AS u INNER JOIN `kuhn`.cpg14x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `kuhn`.cpg14x_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg14x_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg14x_usergroups WHERE group_id= 1 (0s)
    [10] => update `kuhn`.cpg14x_sessions set time='1197971933' where session_id=md5('41be5ae46d76da4e371de5c930c5e315d25c7b1a5d6a4620cc9d60b87fd939d8'); (0s)
    [11] => SELECT user_favpics FROM cpg14x_favpics WHERE user_id = 1 (0s)
    [12] => DELETE FROM cpg14x_banned WHERE expiry < '2007-12-18 21:58:53' (0s)
    [13] => SELECT * FROM cpg14x_banned WHERE (ip_addr='210.48.81.21' OR ip_addr='210.48.81.21' OR user_id=1) AND brute_force=0 (0s)
    [14] => SELECT aid from cpg14x_pictures WHERE pid='2'  LIMIT 1 (0s)
    [15] => SELECT title,keyword from cpg14x_albums WHERE aid='1' (0s)
    [16] => SELECT COUNT(*) from cpg14x_pictures WHERE ((aid='1'  ) )   (0s)
    [17] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, title, caption,hits,owner_id,owner_name from cpg14x_pictures WHERE ((aid='1'  ) )   ORDER BY position ASC  (0.04s)
    [18] => SELECT title,keyword from cpg14x_albums WHERE aid='1' (0s)
    [19] => SELECT COUNT(*) from cpg14x_pictures WHERE ((aid='1'  ) )   (0s)
    [20] => SELECT * from cpg14x_pictures WHERE ((aid='1'  ) )   ORDER BY position ASC  LIMIT 1 ,1 (0s)
    [21] => SELECT title, comments, votes, category, aid FROM cpg14x_albums WHERE aid='1' LIMIT 1 (0s)
    [22] => SELECT name, parent FROM cpg14x_categories WHERE cid = '2' (0s)
    [23] => SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM cpg14x_comments WHERE pid='2' ORDER BY msg_id ASC (0s)
    [24] => SELECT COUNT(*) FROM cpg14x_pictures WHERE approved = 'NO' (0s)
    [25] => SELECT title,keyword from cpg14x_albums WHERE aid='1' (0s)
    [26] => SELECT COUNT(*) from cpg14x_pictures WHERE ((aid='1'  ) )   (0s)
    [27] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, title, caption,hits,owner_id,owner_name from cpg14x_pictures WHERE ((aid='1'  ) )   ORDER BY position ASC  LIMIT 0 ,10 (0s)
)

==========================
GET :
------------------
Array
(
    [pos] => -2
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 5.2.0-8+etch7 - OK
------------------
mySQL version: 5.0.32-Debian_7etch1-log
------------------
Coppermine version: 1.4.14(stable)
==========================
Module: GD
------------------
GD Version: 2.0 or higher
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support:
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.32
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.1.1
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | Off
safe_mode_exec_dir | /usr/bin/ | /usr/bin/
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | /usr/bin/ | /usr/bin/
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/share/php:/usr/share/pear | .:/usr/share/php:/usr/share/pear
open_basedir | /var/www/sites/dtc:/usr/lib/php:/tmp:/usr/share/pear:/var/lib/dtc/etc/dtc404:/usr/share/php:/usr/local/lib/php/phplib: | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | webmaster@kuhn.geek.nz | no value
sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 120 | 120
max_input_time | 120 | 120
upload_max_filesize | 20M | 20M
post_max_size | 20M | 20M
==========================
Page generated in 0.107 seconds - 28 queries in 0.041 seconds - Album set : ; Meta set: ;

densys

Hello,
is this problem unique ? If  I can provide any more usefull information please tell me, I have full access to the server. PHP is NOT running in safe mode.

Kind regards,

Dennis

Nibbler

Remove the dot from your cookie name.

densys

Thanks Nibbler. It worked then straight away ;)

Joachim Müller

Just for clarification: dots are not allowed in cookie names - it's against the specification of cookies. Subsequently, rating (which is cookie-driven) failed to work. This is not related to coppermine exclusively - you mustn't have dots in cookie names, no matter what app is setting the cookie. As an end user doesn't care for cookie names at all anyway, you should leave the default cookie name unless you know what you're doing.

Laicodc

Hello,  I'm having a problem with my rating feature as well.  In my case, it was working fine but then I made a change to the displayimage.php file by adding some code to see if I could put a link in there.  I saved a copy of the file first so I could just copy it back.  I just did this as a test to see if I could add anything to that page. I thought if I had a copy of the original file I would be safe.  But right after, i noticed that the rating feature no longer works even though i coppied the original displayimage.php file back.  Now, if you click on the stars the page reloads but there is no rating. It says (no vote yet) so next I tried to upgrade coppermine figuring that would probably fix it.  so I just upgraded from ver 1.4.10 to 1.4.20.  Everything seems to be fine except that the rating still doesn't work.   Does anybody know why and how I can fix this?

Thank you
http://laicodc.com/gallery

Laicodc

Update:  I just tried the ratings feature using internet explorer and it worked.  That's weird. I guess it had noting to do with me screwing around with that file.  I didn't think so since I copied it back fresh and then I even upgraded the whole thing so i knew the files were brand new and clean.  Anybody know why the rating feature didn't work in firefox? I have the newest version 3.0.6.

Laicodc

Quote from: Laicodc on February 17, 2009, 01:16:13 PM
Hello,  I'm having a problem with my rating feature as well.  In my case, it was working fine but then I made a change to the displayimage.php file by adding some code to see if I could put a link in there.  I saved a copy of the file first so I could just copy it back.  I just did this as a test to see if I could add anything to that page. I thought if I had a copy of the original file I would be safe.  But right after, i noticed that the rating feature no longer works even though i coppied the original displayimage.php file back.  Now, if you click on the stars the page reloads but there is no rating. It says (no vote yet) so next I tried to upgrade coppermine figuring that would probably fix it.  so I just upgraded from ver 1.4.10 to 1.4.20.  Everything seems to be fine except that the rating still doesn't work.   Does anybody know why and how I can fix this?

Thank you

Laicodc

In case this helps anybody. I figured out what the problem was.   In Firefox, there is an add on called RefControl.  This was set to block the referer so it did not send data about the referring page.  I switched it to normal so it DID send the refering data and now it works.   Hope that helps somebody in case they have the same problem. 

Have a great day

Joachim Müller