Critical Error: There was an error while processing a database query Critical Error: There was an error while processing a database query
 

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]

Main Menu

Critical Error: There was an error while processing a database query

Started by chasingame, January 19, 2006, 03:16:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chasingame

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


chasingame

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

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.chasingame.com%2Fgallery%2Falbums%2Fuserpics%2F10002%2F031023_BigFoot.jpg&hash=c5721893ac830daf0b6efb0d4a2bd71cb7edf628)

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

Nibbler


chasingame

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

Here is the error message I recieved:

QuoteSelected 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:

QuoteUSER:
------------------
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: ;

chasingame

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:

QuoteThere 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:

QuoteUSER:
------------------
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: ;

Nibbler

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

chasingame

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:

QuoteThere 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:


QuoteUSER:
------------------
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: ;

Joachim Müller

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.

chasingame

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:

Quote4.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):

QuoteThen 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:

QuoteTemplate 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

Nibbler

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.

chasingame

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:

QuoteThere 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


chasingame

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

Nibbler

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

chasingame

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 ?

chasingame

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

chasingame

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