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

Title: problem with rating picture
Post 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
        (
            [sort] => dd
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => ****
    [groups] => Array
        (
            [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
(
    [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: ;
 
Title: Re: problem with rating picture
Post by: Nibbler on November 22, 2007, 12:06:53 pm
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.
Title: Re: problem with rating picture
Post by: Tophux95 on November 22, 2007, 12:25:49 pm
hello,

 think for help,

 after

     ALTER TABLE `cpg_vote_stats` CHANGE `sid` `sid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT

 its Ok