Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Critical Error: There was an error while processing a database query  (Read 11369 times)

0 Members and 1 Guest are viewing this topic.

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17

Hi,
  Could anyone give me some advice as to where to start solving this problem?  I am not a php programmer but I am a programmer.  I get this error on all users now.

I choose "Upload File", borwse to the file, click submit and get to the screen where I assign the album name.  I assign an album and click submit.  The next page returned is a "Critical Error:  There was an error while processing a database query."

I recently migrated my database from my server at home to a web hosting company.  I installed myphpadmin on my server at home and did a "full" back up.  I then uploaded my coppermine gallery folder to the new server and imported the database (ran the sql script).  For a week every thing seemed to work ok, then yesterday this problem began...

Does this sound like some primary key violation type issue or could the mysql database actually be corrupt somehow ?

Here is my gallery:  http://www.chasingame.com/gallery

Any help would greatly be appreciated...

Thanks,
Anthony
anthony@chasingame.net
« Last Edit: January 20, 2006, 08:12:58 pm by GauGau »
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #2 on: January 19, 2006, 05:55:03 pm »

Ok, I read the documentation on uploading issues.  None of these appear to be my problem.  I just attempted to upload another photo to my "personal" album under the user "anthony".  I got the same error.  I used ftp to access my folder under user pics and here is the file that was successfully uploaded.  Upload and folder security is NOT the problem.

The url for the photo: http://www.chasingame.com/gallery/albums/userpics/10002/031023_BigFoot.jpg

(http://www.chasingame.com/gallery/albums/userpics/10002/031023_BigFoot.jpg)

It obviously uploaded.  In my case, I believe there is a real database issue... so like I said in my original post could this be a primary key (maybe some kind of autoincrement issue) database problem ?  How do I begin to unravel the potential "corruption"?  Or do I just wipe everything, lose 150MG of photos and reinstall ?  (the problem with this solution is my forum contains many many url links to photos in my gallery which I dont want to lose)

Any help will be appreciated.

Thanks,
Anthony
Logged

Nibbler

  • Guest
Re: Critical Error: There was an error while processing a database query
« Reply #3 on: January 19, 2006, 05:59:17 pm »

No need to reinstall anything, just do as I suggested.
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #4 on: January 19, 2006, 09:12:55 pm »

ok, I followed the steps documented under: 4.11.4 Upload troubleshooting

Here is the error message I recieved:

Quote
Selected album does not exist or you don't have permission to upload in this album

File: /home/content/a/j/o/ajowers/html/gallery/db_input.php - Line: 294


Here is the debug info:

Quote
USER:
------------------
Array
(
    [ID] => 6b836f8f95b3ec73db35ecf44a79a26b
    [am] => 1
    [liv] => Array
        (
           
  • => 463
  • [1] => 462
                [2] => 24
                [3] => 402
                [4] => 403
            )

       
[lap] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => anthony
    [groups] => Array
        (
           
  • => 1
  • [1] => 1
                [2] => 2
            )

        [disk_max] => 102400
        [disk_min] => 8192
       
[can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 0
    [ufc_min] => 0
    [custom_user_upload] => 0
    [num_file_upload] => 1
    [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] => 0
    [group_quota] => 102400
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content, player FROM cpg135_filetypes; (0.003s)
  • [1] => select * from cpg135_plugins order by priority asc; (0.002s)
        [2] => delete from `cggallery`.cpg135_sessions where time<1137697792 and remember=0; (0.004s)
        [3] => delete from `cggallery`.cpg135_sessions where time<1136491792; (0.003s)
        [4] => select user_id from `cggallery`.cpg135_sessions where session_id=md5("a3951f1091d604ea8a9c70ee154a6b991b352f535bc54afecf6e049547cb8659"); (0.19s)
        [5] => select user_id as id, user_password as password from `cggallery`.cpg135_users where user_id=2 (0.002s)
        [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 `cggallery`.cpg135_users AS u INNER JOIN `cggallery`.cpg135_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='2' (0.001s)
        [7] => SELECT user_group_list FROM `cggallery`.cpg135_users AS u WHERE user_id='2' and user_group_list <> ''; (0.001s)
        [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 cpg135_usergroups WHERE group_id in (1,1,2) (0.002s)
        [9] => SELECT group_name FROM  cpg135_usergroups WHERE group_id= 1 (0.002s)
        [10] => update `cggallery`.cpg135_sessions set time='1137701393' where session_id=md5('a3951f1091d604ea8a9c70ee154a6b991b352f535bc54afecf6e049547cb8659'); (0.003s)
        [11] => SELECT user_favpics FROM cpg135_favpics WHERE user_id = 2 (0.02s)
        [12] => DELETE FROM cpg135_banned WHERE expiry < '2006-01-19 15:09:53' (0.006s)
        [13] => SELECT * FROM cpg135_banned WHERE (ip_addr='64.90.24.169' OR ip_addr='64.90.24.169' OR user_id=2) AND brute_force=0 (0.001s)
        [14] => SELECT category FROM cpg135_albums WHERE aid='0' (0.016s)
        [15] => SELECT COUNT(*) FROM cpg135_pictures WHERE approved = 'NO' (0.001s)
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
       
[album] =>
    [MAX_FILE_SIZE] => 1048576
    [title] => Geek - Upload Test
    [caption] =>
    [keywords] =>
    [event] => picture
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.11 - OK
------------------
mySQL version: 4.0.24-max-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 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
==========================
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 | ~ | ~
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 | relay-hosting.secureserver.net | relay-hosting.secureserver.net
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 | 8M | 8M
post_max_size | 8M | 8M
==========================
Page generated in 1.822 seconds - 16 queries in 0.257 seconds - Album set : ; Meta set: ;
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #5 on: January 19, 2006, 09:27:07 pm »

I just tried uploading a second photo.  Before trying it I ftp'd into my account and made sure that all Album folders had Read, Write, Execute permissions for "All Users" Is this correct folder permission? Note: the target machine is Linux.

Then I tried another upload.

Here is now the error I am getting:

Quote
There was an error while processing a database query.

While executing query "INSERT INTO cpg135_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 ('', '25', 'userpics/10002/', 'attachment.jpg', '52212', '91232', '447', '480', '1137702122', '2', 'anthony','Humongous Deer Kill !', '', '', 'YES', '', '', '', '', '64.90.24.169', '64.90.24.169', '0')" on 0

mySQL error: Duplicate entry '0' for key 1

Here is the debug info for this transaction:

Quote
USER:
------------------
Array
(
    [ID] => 6b836f8f95b3ec73db35ecf44a79a26b
    [am] => 1
    [liv] => Array
        (
           
  • => 463
  • [1] => 462
                [2] => 24
                [3] => 402
                [4] => 403
            )

       
[lap] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => anthony
    [groups] => Array
        (
           
  • => 1
  • [1] => 1
                [2] => 2
            )

        [disk_max] => 102400
        [disk_min] => 8192
       
[can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 0
    [ufc_min] => 0
    [custom_user_upload] => 0
    [num_file_upload] => 1
    [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] => 0
    [group_quota] => 102400
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content, player FROM cpg135_filetypes; (0.053s)
  • [1] => select * from cpg135_plugins order by priority asc; (0.032s)
        [2] => delete from `cggallery`.cpg135_sessions where time<1137698521 and remember=0; (0.249s)
        [3] => delete from `cggallery`.cpg135_sessions where time<1136492521; (0.059s)
        [4] => select user_id from `cggallery`.cpg135_sessions where session_id=md5("a3951f1091d604ea8a9c70ee154a6b991b352f535bc54afecf6e049547cb8659"); (0.007s)
        [5] => select user_id as id, user_password as password from `cggallery`.cpg135_users where user_id=2 (0.003s)
        [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 `cggallery`.cpg135_users AS u INNER JOIN `cggallery`.cpg135_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='2' (0.004s)
        [7] => SELECT user_group_list FROM `cggallery`.cpg135_users AS u WHERE user_id='2' and user_group_list <> ''; (0.012s)
        [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 cpg135_usergroups WHERE group_id in (1,1,2) (0.001s)
        [9] => SELECT group_name FROM  cpg135_usergroups WHERE group_id= 1 (0.011s)
        [10] => update `cggallery`.cpg135_sessions set time='1137702121' where session_id=md5('a3951f1091d604ea8a9c70ee154a6b991b352f535bc54afecf6e049547cb8659'); (0.004s)
        [11] => SELECT user_favpics FROM cpg135_favpics WHERE user_id = 2 (0.001s)
        [12] => DELETE FROM cpg135_banned WHERE expiry < '2006-01-19 15:22:01' (0.003s)
        [13] => SELECT * FROM cpg135_banned WHERE (ip_addr='64.90.24.169' OR ip_addr='64.90.24.169' OR user_id=2) AND brute_force=0 (0.002s)
        [14] => SELECT category FROM cpg135_albums WHERE aid='25' (0.003s)
        [15] => INSERT INTO cpg135_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 ('', '25', 'userpics/10002/', 'attachment.jpg', '52212', '91232', '447', '480', '1137702122', '2', 'anthony','Humongous Deer Kill !', '', '', 'YES', '', '', '', '', '64.90.24.169', '64.90.24.169', '0') (0.001s)
        [16] => SELECT COUNT(*) FROM cpg135_pictures WHERE approved = 'NO' (0.003s)
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
       
[album] => 25
    [MAX_FILE_SIZE] => 1048576
    [title] => Humongous Deer Kill !
    [caption] =>
    [keywords] =>
    [event] => picture
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.11 - OK
------------------
mySQL version: 4.0.24-max-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 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
==========================
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 | ~ | ~
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 | relay-hosting.secureserver.net | relay-hosting.secureserver.net
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 | 8M | 8M
post_max_size | 8M | 8M
==========================
Page generated in 2.32 seconds - 17 queries in 0.448 seconds - Album set : ; Meta set: ;
Logged

Nibbler

  • Guest
Re: Critical Error: There was an error while processing a database query
« Reply #6 on: January 19, 2006, 09:55:04 pm »

Right, I fixed that error myself in 1.4.3 - update your gallery.
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #7 on: January 19, 2006, 11:36:18 pm »

Ok, I just updated to 1.4.3.  I copied all scripts, etc on top of old ones, ran the update successfully, ran the version check, all reports "Ok".  Debug mode is still on.

I logged in as myself and uploaded a file.  I am still getting the error.  I still believe this is a database issue......Are there autoincrement keys that can get out of sync??????


error I recieved:

Quote
There was an error while processing a database query.

While executing query "INSERT INTO cpg135_pictures (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 ('25', 'userpics/10002/', 'chasingameforum.png', '16898', '18960', '363', '110', '1137709740', '2', 'anthony','', '', '', 'YES', '', '', '', '', '64.90.24.169', '64.90.24.169', '0')" on 0

mySQL error: Duplicate entry '0' for key 1

File: /home/content/a/j/o/ajowers/html/gallery/include/functions.inc.php - Line: 248

The debug info:


Quote
USER:
------------------
Array
(
    [ID] => 6b836f8f95b3ec73db35ecf44a79a26b
    [am] => 1
    [liv] => Array
        (
           
  • => 463
  • [1] => 462
                [2] => 24
                [3] => 402
                [4] => 403
            )

       
[lap] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => anthony
    [groups] => Array
        (
           
  • => 2
  • [1] => 1
            )

        [disk_max] => 102400
        [disk_min] => 8192
       
[can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 0
    [ufc_min] => 0
    [custom_user_upload] => 0
    [num_file_upload] => 1
    [num_URI_upload] => 0
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 0
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Registered
    [upload_form_config] => 0
    [group_quota] => 102400
    [can_see_all_albums] => 0
    [group_id] => 2
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content, player FROM cpg135_filetypes; (0.001s)
  • [1] => select * from cpg135_plugins order by priority asc; (0.001s)
        [2] => delete from `cggallery`.cpg135_sessions where time<1137706139 and remember=0; (0.001s)
        [3] => delete from `cggallery`.cpg135_sessions where time<1136500139; (0.001s)
        [4] => select user_id from `cggallery`.cpg135_sessions where session_id=md5("fe90219f384b62f8b69fa997bc0efac41b352f535bc54afecf6e049547cb8659"); (0.001s)
        [5] => select user_id as id, user_password as password from `cggallery`.cpg135_users where user_id=2 (0.001s)
        [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 `cggallery`.cpg135_users AS u INNER JOIN `cggallery`.cpg135_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='2' (0.001s)
        [7] => SELECT user_group_list FROM `cggallery`.cpg135_users AS u WHERE user_id='2' and user_group_list <> ''; (0.001s)
        [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 cpg135_usergroups WHERE group_id in (2,1) (0.001s)
        [9] => SELECT group_name FROM  cpg135_usergroups WHERE group_id= 2 (0.001s)
        [10] => update `cggallery`.cpg135_sessions set time='1137709739' where session_id=md5('fe90219f384b62f8b69fa997bc0efac41b352f535bc54afecf6e049547cb8659'); (0.001s)
        [11] => SELECT user_favpics FROM cpg135_favpics WHERE user_id = 2 (0.001s)
        [12] => DELETE FROM cpg135_banned WHERE expiry < '2006-01-19 17:28:59' (0.001s)
        [13] => SELECT * FROM cpg135_banned WHERE (ip_addr='64.90.24.169' OR ip_addr='64.90.24.169' OR user_id=2) AND brute_force=0 (0.001s)
        [14] => SELECT aid FROM cpg135_albums WHERE visibility != '0' AND visibility !='10002' AND visibility NOT IN (2,1) (0.001s)
        [15] => SELECT category FROM cpg135_albums WHERE aid='25' and (uploads = 'YES' OR category = '10002') (0.001s)
        [16] => SELECT sum(total_filesize) FROM cpg135_pictures, cpg135_albums WHERE  cpg135_pictures.aid = cpg135_albums.aid AND category = '10002' (0.002s)
        [17] => INSERT INTO cpg135_pictures (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 ('25', 'userpics/10002/', 'chasingameforum.png', '16898', '18960', '363', '110', '1137709740', '2', 'anthony','', '', '', 'YES', '', '', '', '', '64.90.24.169', '64.90.24.169', '0') (0.001s)
        [18] => SELECT COUNT(*) FROM cpg135_pictures WHERE approved = 'NO' (0.001s)
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
       
[album] => 25
    [MAX_FILE_SIZE] => 1048576
    [title] =>
    [caption] =>
    [keywords] =>
    [event] => picture
)

==========================
Page generated in 0.273 seconds - 19 queries in 0.02 seconds - Album set : ; Meta set: ;
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Critical Error: There was an error while processing a database query
« Reply #8 on: January 20, 2006, 07:21:42 am »

don't post debug_output unless requested. Instead: do as suggested in the upload troubelshooting section of the docs. Re-read it carefully. If you don't, we won't be able to help.
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #9 on: January 20, 2006, 03:36:47 pm »

Ok, I am confused as to what you are wanting.  Could you be a bit more specific ?

I performed these steps prior to upgrading to 1.4.3 from 1.4.2:

Quote
4.11.4 Upload troubleshooting
If you are experiencing issues with coppermine's upload process, temporarily change your coppermine settings as suggested below to get more detailed error messages:

Go to your coppermine page and log in as admin
Go to the config screen
Scroll to the bottom of the page
Expand the "Maintenance settings" section by clicking on it
Enable debug mode for everyone
Leave display of notices switched off
Save the new settings by clicking on "Save new configuration"
Go to the "groups" panel
Set the upload form configuration for all groups to "Single file uploads only" (set File upload boxes to "1", URI upload boxes to "0" and No. of boxes to "fixed")
Save your new settings


Then I tried the following (from the last paragraph):

Quote
Then try to upload (using http uploads, even if you experienced troubles using another upload method) - you should get a more detailed error message that tells you what exactly goes wrong with your uploads. If the error message doesn't mean anything to you, search the support board for the error message you get.
When asking for support on the coppermine forum, post a link to your site and a test user account (the test user mustn't be in the admin group!) with upload privileges, with the above mentioned settings in place - this way, supporters can see the error messages as well.

ok, the only think I had not done was register a test user for you to login and test my problem.  So, I clicked register and filled out the screen properly and clicked the post button.

I get the following response:

Quote
Template error
Failed to find block 'log_ecards'(#(<!-- BEGIN log_ecards -->)(.*?)(<!-- END log_ecards -->)#s) in :

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>

                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>

                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>


Ok, feeling that maybe during the ftp upload, a file may have been corrupted or not copied, I once again ftp'd everything from the 1.4.3 extract (except the Albums folder) into my gallery folder on the website.  I logged in as admin and ran the database update again and checked my sources.  All checks out fine.

Then I right clicked each php file and made sure the permissions were execute for all users.  Keep in mind I am running the system on www.GoDaddy.com and all I have is an ftp login.  I can not get to a shell prompt and run chmod command.

I tried register again awith the same results.

I really appreciate your help but my gallery is down and I am not getting anywhere...

Can you give me any more constructive advise ?

Thanks,
Anthony
Logged

Nibbler

  • Guest
Re: Critical Error: There was an error while processing a database query
« Reply #10 on: January 20, 2006, 03:53:14 pm »

Apply the fix for the log_ecards issue as described here and search for/post the mysql error message that you get. The `pid` field in the pictures table should be set to auto_increment. Verify that it is correct using phpmyadmin.
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #11 on: January 20, 2006, 04:12:35 pm »

Thanks.  I made the script change and got a little bit further.  Now I am getting another database sql error.  In fact, it is the same one:

Quote
There was an error while processing a database query.

While executing query "INSERT INTO cpg135_users (user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6) VALUES (NOW(), 'YES', '', 'newuser', 'test', 'anthony@chasingame.net', '', '', '', '', '', '')" on 0

File: /home/content/a/j/o/ajowers/html/gallery/include/functions.inc.php - Line: 248


I used phpmyadmin on my web hosting account to view the structure of the cpg135_pictures table.  The "Extra" column is blank.  I believe this should have "auto increment" shouldn't it ?
What this is telling me is that when I installed phpmyadmin on my server at home and exported the database as an sql script, then ran the sql script against the database on my web hosting account that the tables were not created properly.

Do you feel I should do something like the following ? :

1)  export my current database as an sql script and save it on my hard drive
2) drop the database
3) create the database
4) run the gallery install script
5) modify the sql script on my hard drive such that it does not drop the tables but just performs the inserts to load the data.

Will this preserve the database integrity ?

    --- or ---

Should I modify all the tables that need an auto increment key with the phpmyadmin on my hosting account ?  Will this work ?

Anthony

« Last Edit: January 20, 2006, 05:58:20 pm by chasingame »
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #12 on: January 20, 2006, 06:02:02 pm »

Using phpmyadmin, the current cpg135_pictures table does not have auto increment on its primary key.

what do you suggest I do now ?

Thanks,
Anthony
Logged

Nibbler

  • Guest
Re: Critical Error: There was an error while processing a database query
« Reply #13 on: January 20, 2006, 06:10:47 pm »

Add the auto_increment. Look at sql/schema.sql to see which fields are supposed to auto_increment fields.
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #14 on: January 20, 2006, 06:15:26 pm »

Ok, I verified that none of my tables have the auto-increment attibute at the moment. 

How does Mysql obtain the "next key" value.  In other words the next time a row is inserted how does it obtain the value for the next key ?  Will I have to set this value as well as the atribute ?
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #15 on: January 20, 2006, 06:32:20 pm »

Using the schema.sql, I modified all columns in all tables with auto increment attributes.

Do you suggest just testing it out now ?  or is there anything special I need to do next ?

Thanks,
Anthony
Logged

chasingame

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Critical Error: There was an error while processing a database query
« Reply #16 on: January 20, 2006, 06:41:00 pm »

Here is the url to my gallery:

http://www.chasingame.com/gallery/index.php

here is a test user:  "newuser"  password = "test"

debug mode is still turn on.

I just tested registering a new user... worked
uploading a photo... worked.

Are there any more diganostics you reccomend now, or should the problem be fixed now ?

Thanks,
Anthony
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 20 queries.