forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Tophux95 on November 22, 2007, 11:38:41 am
-
hello,
I have a problem with the rating of the photos it does not work anymore I get the error message
------------------------------------------------------------------------------------------------------------------
While executing query "INSERT INTO cpg_vote_stats
SET
pid = 2259,
rating = 5,
Ip = '83.114.76.155',
sdate = '1195727291',
referer = 'http%3A%2F%2Fwww.reflex-photo.org%2Fdisplayimage.php%3Falbum%3Dlastup%26cat%3D0%26pos%3D3',
browser = 'Unknown',
os = 'Unknown'" on 0
mySQL error: Duplicate entry '255' for key 1
-----------------------------------------------------------------------------------------------------------------
and debug window :
-----------------------------------------------------------------------------------------------------------------
USER:
------------------
Array
(
[ID] => 592343bcda9709f39a16030c1d9d5b7d
[am] => 1
[lang] => french
[lap] => 2
[liv] => Array
(
- => 2258
[1] => 2262
[2] => 1159
)
[sort] => dd
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 1
[user_name] => ****
[groups] => Array
(
- => 1
[1] => 7
)
[disk_max] => 40960
[disk_min] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 1
[ufc_max] => 1
[ufc_min] => 1
[custom_user_upload] => 1
[num_file_upload] => 10
[num_URI_upload] => 0
[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] => 1
[group_quota] => 0
[can_see_all_albums] => 1
[group_id] => 1
)
==========================
Queries:
------------------
Array
(
- => SELECT extension, mime, content, player FROM cpg_filetypes; (0.001s)
[1] => select * from cpg_plugins order by priority asc; (0.004s)
[2] => delete from `reflexphreflex`.cpg_sessions where time<1195723690 and remember=0; (0.176s)
[3] => delete from `reflexphreflex`.cpg_sessions where time<1194517690; (0.173s)
[4] => select user_id from `reflexphreflex`.cpg_sessions where session_id=md5("ed0e28d7bae7aa188885e9fa0f959dc8796e2195a2b4d676b24c40251f06a7e8"); (0.001s)
[5] => select user_id as id, user_password as password from `reflexphreflex`.cpg_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 `reflexphreflex`.cpg_users AS u INNER JOIN `reflexphreflex`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.001s)
[7] => SELECT user_group_list FROM `reflexphreflex`.cpg_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 cpg_usergroups WHERE group_id in (1,7) (0.001s)
[9] => SELECT group_name FROM cpg_usergroups WHERE group_id= 1 (0s)
[10] => update `reflexphreflex`.cpg_sessions set time='1195727291' where session_id=md5('ed0e28d7bae7aa188885e9fa0f959dc8796e2195a2b4d676b24c40251f06a7e8'); (0.091s)
[11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0.002s)
[12] => SELECT * FROM cpg_mark_users WHERE user_id = 1 (0.001s)
[13] => SELECT * FROM cpg_mark_config (0.001s)
[14] => DELETE FROM cpg_mod_online WHERE last_action < NOW() - INTERVAL 3 MINUTE (0.004s)
[15] => REPLACE INTO cpg_mod_online (user_id, user_name, user_ip, last_action) VALUES ('1', 'tophe', '83.114.76.155', NOW()) (0.027s)
[16] => DELETE FROM cpg_banned WHERE expiry < '2007-11-22 10:28:11' (0.001s)
[17] => SELECT * FROM cpg_banned WHERE (ip_addr='xx.xxx.xx.xxx' OR ip_addr='xx.xx.xxx.xx' OR user_id=1) AND brute_force=0 (0.001s)
[18] => SELECT a.votes as votes_allowed, p.votes as votes, pic_rating, owner_id FROM cpg_pictures AS p, cpg_albums AS a WHERE p.aid = a.aid AND pid = '2259' LIMIT 1 (0.001s)
[19] => DELETE FROM cpg_votes WHERE vote_time < 1193135291 (0.001s)
[20] => SELECT * FROM cpg_votes WHERE pic_id = '2259' AND user_md5_id = 'c4ca4238a0b923820dcc509a6f75849b' (0s)
[21] => UPDATE cpg_pictures SET pic_rating = '10000', votes = votes + 1 WHERE pid = '2259' LIMIT 1 (0.001s)
[22] => INSERT INTO cpg_votes VALUES ('2259', 'c4ca4238a0b923820dcc509a6f75849b', '1195727291') (0.062s)
[23] => INSERT INTO cpg_vote_stats
SET
pid = 2259,
rating = 5,
Ip = '83.114.76.155',
sdate = '1195727291',
referer = 'http%3A%2F%2Fwww.reflex-photo.org%2Fdisplayimage.php%3Falbum%3Dlastup%26cat%3D0%26pos%3D3',
browser = 'Unknown',
os = 'Unknown' (0.001s)
[24] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0.001s)
)
==========================
GET :
------------------
Array
(
[pic] => 2259
[rate] => 5
)
==========================
POST :
------------------
Array
(
)
==========================
VERSION INFO :
------------------
PHP version: 4.4.7 - OK
------------------
mySQL version: 4.0.25-standard-log
------------------
Coppermine version: 1.4.13(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
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
XBM Support: 1
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
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/local/lib/php | .:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
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 | 30 | 30
max_input_time | -1 | -1
upload_max_filesize | 16M | 16M
post_max_size | 32M | 32M
==========================
Page generated in 0.816 seconds - 25 queries in 0.552 seconds - Album set : ; Meta set: ;
-
Ensure the `sid` field on the cpg_vote_stats table is set as INT using phpMyAdmin. Seems like you may have it set as TINYINT.
-
hello,
think for help,
after
ALTER TABLE `cpg_vote_stats` CHANGE `sid` `sid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT
its Ok