Upload Issue Upload Issue
 

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

Upload Issue

Started by luvthmud, October 07, 2006, 08:32:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

luvthmud

Hi,

I was posting by "upload file" under my admin login to an album on my coppermine photo gallery and got the error below.  I got the error being logged in under "admin" > clicking on upload file > clicked browse > navigated to file on my computer > selected the file > clicked on continue > the file successfully uploaded > clicked on continue again and the error below appeared.  Can anyone tell me what I'm doing wrong or is it a Coppermine issue?  Thanks in advance :::smiles:::

While executing query "INSERT INTO cpg_pictures (pid, aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('', '6', 'userpics/10001/', 'scan0001~1.jpg', '308680', '457867', '1182', '788', '1160201768', '1', 'admin','', '', '', 'YES', '', '', '', '', '69.19.109.96', '69.19.109.96', '0')" on 0

mySQL error: Unknown column 'position' in 'field list'

luvthmud

#1
Hi,

I was posting by "upload file" under my admin login to an album on my coppermine photo gallery and got the error below.  I got the error being logged in under "admin" > clicking on upload file > clicked browse > navigated to file on my computer > selected the file > clicked on continue > the file successfully uploaded > clicked on continue again and the error below appeared.  Can anyone tell me what I'm doing wrong or is it a Coppermine issue?  Thanks in advance :::smiles:::

While executing query "INSERT INTO cpg_pictures (pid, aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('', '6', 'userpics/10001/', 'scan0001~1.jpg', '308680', '457867', '1182', '788', '1160201768', '1', 'admin','', '', '', 'YES', '', '', '', '', '69.19.109.96', '69.19.109.96', '0')" on 0

mySQL error: Unknown column 'position' in 'field list'

ALSO, below is the debug information::::::::::::::::::::::::

USER:
------------------
Array
(
    [ID] => fca216ad2e39ce4761d3d432da34c1e7
    [am] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => admin
    [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] => 0
    [num_file_upload] => 10
    [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 cpg_filetypes; (0s)
    [1] => delete from `scottcou_copp1`.cpg_sessions where time<1160198165 and remember=0; (0s)
    [2] => delete from `scottcou_copp1`.cpg_sessions where time<1158992165; (0s)
    [3] => select user_id from `scottcou_copp1`.cpg_sessions where session_id=md5("abd1089608dafd45c6ce38deb2813cea6add9e334078b7b37feaeda5c9e4973e"); (0s)
    [4] => select user_id as id, user_password as password from `scottcou_copp1`.cpg_users where user_id=1 (0s)
    [5] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `scottcou_copp1`.cpg_users AS u INNER JOIN `scottcou_copp1`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [6] => SELECT user_group_list FROM `scottcou_copp1`.cpg_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [7] => 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) (0s)
    [8] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0s)
    [9] => update `scottcou_copp1`.cpg_sessions set time='1160201765' where session_id=md5('abd1089608dafd45c6ce38deb2813cea6add9e334078b7b37feaeda5c9e4973e'); (0s)
    [10] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
    [11] => DELETE FROM cpg_banned WHERE expiry < '2006-10-07 06:16:05' (0s)
    [12] => SELECT * FROM cpg_banned WHERE (ip_addr='69.19.109.96' OR ip_addr='69.19.109.96' OR user_id=1) AND brute_force=0 (0s)
    [13] => SELECT aid, title FROM cpg_albums WHERE category < 10000 ORDER BY title (0s)
    [14] => SELECT aid, title FROM cpg_albums WHERE category='10001' ORDER BY title (0s)
    [15] => SELECT encoded_string FROM cpg_temp_data WHERE unique_ID = '3523c6d9' (0s)
    [16] => UPDATE cpg_temp_data SET encoded_string = 'YTowOnt9' WHERE unique_ID = '3523c6d9' (0s)
    [17] => SELECT category FROM cpg_albums WHERE aid='6' (0s)
    [18] => INSERT INTO cpg_pictures (pid, aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('', '6', 'userpics/10001/', 'scan0001~1.jpg', '308680', '457867', '1182', '788', '1160201768', '1', 'admin','', '', '', 'YES', '', '', '', '', '69.19.109.96', '69.19.109.96', '0') (0s)
    [19] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0s)
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
    [album] => 6
    [title] =>
    [caption] =>
    [keywords] =>
    [control] => phase_2
    [unique_ID] => 3523c6d9
    [debugtext] => USER:
------------------
Array
(
    [ID] => fca216ad2e39ce4761d3d432da34c1e7
    [am] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => admin
    [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] => 0
    [num_file_upload] => 10
    [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 cpg_filetypes; (0s)
    [1] => delete from `scottcou_copp1`.cpg_sessions where time<1160198137 and remember=0; (0s)
    [2] => delete from `scottcou_copp1`.cpg_sessions where time<1158992137; (0s)
    [3] => select user_id from `scottcou_copp1`.cpg_sessions where session_id=md5("abd1089608dafd45c6ce38deb2813cea6add9e334078b7b37feaeda5c9e4973e"); (0.001s)
    [4] => select user_id as id, user_password as password from `scottcou_copp1`.cpg_users where user_id=1 (0s)
    [5] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `scottcou_copp1`.cpg_users AS u INNER JOIN `scottcou_copp1`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [6] => SELECT user_group_list FROM `scottcou_copp1`.cpg_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [7] => 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) (0s)
    [8] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0s)
    [9] => update `scottcou_copp1`.cpg_sessions set time='1160201737' where session_id=md5('abd1089608dafd45c6ce38deb2813cea6add9e334078b7b37feaeda5c9e4973e'); (0s)
    [10] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
    [11] => DELETE FROM cpg_banned WHERE expiry < '2006-10-07 06:15:37' (0s)
    [12] => SELECT * FROM cpg_banned WHERE (ip_addr='69.19.109.96' OR ip_addr='69.19.109.96' OR user_id=1) AND brute_force=0 (0s)
    [13] => SELECT aid, title FROM cpg_albums WHERE category < 10000 ORDER BY title (0s)
    [14] => SELECT aid, title FROM cpg_albums WHERE category='10001' ORDER BY title (0s)
    [15] => SELECT encoded_string FROM cpg_temp_data WHERE unique_ID = '3523c6d9' (0.001s)
    [16] => UPDATE cpg_temp_data SET encoded_string = 'YToxOntpOjA7YTozOntzOjExOiJhY3R1YWxfbmFtZSI7czoxMjoic2NhbjAwMDEuanBnIjtzOjE0OiJ0ZW1wb3JhcnlfbmFtZSI7czoyMzoibUhUVFBfdGVtcF8xZDhkN2ZhNi5qcGciO3M6MTI6InByZXZpZXdfcGF0aCI7czozNDoiLi9hbGJ1bXMvZWRpdC9wcmV2aWV3XzhjNzBiMTIzLmpwZyI7fX0=' WHERE unique_ID = '3523c6d9' (0s)
    [17] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0.007s)
    [18] => SELECT cat.name FROM cpg_categories cat, cpg_albums alb WHERE alb.aid='5' AND cat.cid=alb.category (0.019s)
    [19] => SELECT cat.name FROM cpg_categories cat, cpg_albums alb WHERE alb.aid='4' AND cat.cid=alb.category (0s)
    [20] => SELECT cat.name FROM cpg_categories cat, cpg_albums alb WHERE alb.aid='3' AND cat.cid=alb.category (0s)
    [21] => SELECT cat.name FROM cpg_categories cat, cpg_albums alb WHERE alb.aid='2' AND cat.cid=alb.category (0s)
    [22] => SELECT cat.name FROM cpg_categories cat, cpg_albums alb WHERE alb.aid='1' AND cat.cid=alb.category (0.001s)
    [23] => SELECT cat.name FROM cpg_categories cat, cpg_albums alb WHERE alb.aid='6' AND cat.cid=alb.category (0s)
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
    [unique_ID] => 3523c6d9
    [control] => phase_2
    [debugtext] => USER:
------------------
Array
(
    [ID] => fca216ad2e39ce4761d3d432da34c1e7
    [am] => 1
)

==========================
==========================
VERSION INFO :
------------------
PHP version: 4.4.2 - OK
------------------
mySQL version: 4.1.21-standard-log
------------------
Coppermine version: 1.4.2(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
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 4.1.21
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
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/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | 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 | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 24M | 24M
post_max_size | 24M | 24M
==========================
Page generated in 0.747 seconds - 18 queries in 0.001 seconds - Album set : ; Meta set: ;
)

==========================
VERSION INFO :
------------------
PHP version: 4.4.2 - OK
------------------
mySQL version: 4.1.21-standard-log
------------------
Coppermine version: 1.4.2(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
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 4.1.21
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
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/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | 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 | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 24M | 24M
post_max_size | 24M | 24M
==========================
Page generated in 0.333 seconds - 24 queries in 0.029 seconds - Album set : ; Meta set: ;
)

==========================
VERSION INFO :
------------------
PHP version: 4.4.2 - OK
------------------
mySQL version: 4.1.21-standard-log
------------------
Coppermine version: 1.4.2(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
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 4.1.21
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
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/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | 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 | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 24M | 24M
post_max_size | 24M | 24M
==========================
Page generated in 2.819 seconds - 20 queries in 0 seconds - Album set : ; Meta set: ;

Stramm

Merged your two identical threads. Don't post the debug output unless requested and follow the upload troubleshooting guide

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble

Nibbler

It means you have not updated your gallery correctly.

iyer_ajay

I'm facing the exact same issue (unable to upload pics, using admin/any other user profile)
I recently upgraded from 1.3. to 1.4.2, and have been facing this problem ever since.
I have looked at the upload troubleshooting guide, and gone through the other related topics, but could not find any other solution.
How do i downgrade from 1.4.2 to 1.3 (the earlier version), and/or resolve this issue, without losing my pictures that have already been uploaded using version 1.3.

If i try to remove 1.4.2, it's warning me that it will delete all existing data & my SQL DB,/user.

Please help.

Thanks.

Aj

Joachim Müller

Downgrading is explained in the docs, however you shouldn't downgrade, but upgrade to the most recent version (which currently is cpg1.4.10). The fact that you upgraded to the ancient version cpg1.4.2 shows that you used an upgrade mechanism provided by your webhost (probably Fantastico/CPanel), which goes unsupported and is not recommended. You should perform upgrades exactly as suggested in our docs instead of using crappy upgrading mechanisms provided by third party tools like Fantastico.