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 skidog326, November 25, 2005, 12:39:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

skidog326

Alright team,

I'm running Coppermine 1.4.1 (Opps-- I ment 1.4.2) on my own desktop (XP Pro) emulating the server side using 'localhost'.

I have MySQL Server 5, PHP 5.1 and GD 2 installed and configured in IIS 5.1.

I'm able to install, run, and configure Coppermine fine. 

(I had some trouble creating a new database in mysql so I am using the 'test' database.)

After I login to Coppermine, I am able to create a new categories and change admin settings, but when I go to create a new album, I receive the message:

"Critical error"
"There was an error while processing a database query"


I need to create an album before I can try batch uploading photos...

Any ideas?   ???

Thank you for ur help!!
--

Joachim Müller

cpg1.4.1 is beta software and goes unsupported, only the stable release cpg1.4.2 (or better, if there's going to be an upgrade later) go supported. Upgrade to cpg1.4.2 if you need support.

skidog326

Opps, I missed typed I'm using Coppermine 1.4.2...  I re-downloaded 1.4.2 again just incase & I'm still receiving the same error... 

At 1st I though it was a problem with the database I was using in MySQL.  But after creating a new one, I'm still having the same problem....

--

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

skidog326

** Full error message w/ debug mode enabled: **

"While executing query "INSERT INTO cpg140_albums (category, title, uploads, pos) VALUES ('2', '1st-album', 'NO',  '1')" on 0
mySQL error: Field 'description' doesn't have a default value"


** File **

...\coppermine\include\functions.inc.php - Line: 248


** Debug Info **

USER:
------------------
Array
(
    [ID] => a03c657aded9f27da926fc25c6f5b0cd
    [am] => 1
    [lang] => english
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => shupack
    [groups] => Array
        (
           
  • => 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] => 5
        [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
    (
       
  • => SELECT extension, mime, content, player FROM cpg140_filetypes; (0.001s)
        [1] => select * from cpg140_plugins order by priority asc; (0.001s)
        [2] => delete from `photos`.cpg140_sessions where time<1132937093 and remember=0; (0s)
        [3] => delete from `photos`.cpg140_sessions where time<1131731093; (0s)
        [4] => select user_id from `photos`.cpg140_sessions where session_id=md5("b1c117accc3c1a53b724ffe147fe242e39c79668291066925881e67ec6eee7e5"); (0s)
        [5] => select user_id as id, user_password as password from `photos`.cpg140_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 `photos`.cpg140_users AS u INNER JOIN `photos`.cpg140_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
        [7] => SELECT user_group_list FROM `photos`.cpg140_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 cpg140_usergroups WHERE group_id in (1) (0.001s)
        [9] => SELECT group_name FROM  cpg140_usergroups WHERE group_id= 1 (0.001s)
        [10] => update `photos`.cpg140_sessions set time='1132940693' where session_id=md5('b1c117accc3c1a53b724ffe147fe242e39c79668291066925881e67ec6eee7e5'); (0s)
        [11] => SELECT user_favpics FROM cpg140_favpics WHERE user_id = 1 (0s)
        [12] => DELETE FROM cpg140_banned WHERE expiry < '2005-11-25 17:44:53' (0s)
        [13] => SELECT * FROM cpg140_banned WHERE (ip_addr='127.0.0.1' OR ip_addr='127.0.0.1' OR user_id=1) AND brute_force=0 (0s)
        [14] => SELECT COUNT(*) FROM cpg140_pictures WHERE approved = 'NO' (0s)
        [15] => INSERT INTO cpg140_albums (category, title, uploads, pos) VALUES ('2', 'New album', 'NO',  '1') (0s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
        [what] => albmgr
    )

    ==========================
    POST :
    ------------------
    Array
    (
        [delete_album] =>
        [sort_order] =>
        [cat] => 2
        [to] => Array
            (
               
  • => album_no=0,album_nm=\'New album\',album_sort=1,action=1
            )

        [album_nm] => New album
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 5.1.0 - OK
    ------------------
    mySQL version: 5.0.16-nt
    ------------------
    Coppermine version: 1.4.2(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
    XPM Support:
    XBM Support: 1
    JIS-mapped Japanese Font Support:

    ==========================
    Module: mysql
    ------------------
    MySQL Supportenabled
    Active Persistent Links 0
    Active Links 1
    Client API version 4.1.7
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Stream Wrapper support compress.zlib://
    Stream Filter support zlib.inflate, zlib.deflate
    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 | .;C:\php5\pear | .;C:\php5\pear
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | me@localhost.com | me@localhost.com
    sendmail_path | no value | no value
    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 | 2M | 2M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 0.141 seconds - 16 queries in 0.004 seconds - Album set : ; Meta set: ;
--

kegobeer

With MySQL 5+ I believe table fields must have a default value.  If you can, I recommend downgrading MySQL to the latest 4.x.x version.  If not, you'll have to go thru all the tables and manually add default values to fields that don't have them.

Use phpMyAdmin and try this SQL query.  Make sure to back up your database first!

ALTER TABLE cpg140_albums CHANGE description description text NOT NULL default ''
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

skidog326

Ok— I downgraded to MySQL 4.1 and was able to create albums.  Thank you for the help!!  = )

Now, I am having a problem with loading photos into Coppermine via "Batch Add Files"

1)   I created a folder "cars" in my albums directory
2)   I copied about 4 jpg to the "cars" folder— (ie: photo001.jpg)
3)   I want to add these files to Coppermine using the "Batch Add Files"

** I receive this error: **

Please select a directory
  /...\albums/

"There are no folders inside the "albums" folder yet. Make sure to create at least one custom folder within "albums" folder and ftp-upload your files there. You mustn't upload to the "userpics" nor "edit" folders, they are reserved for http uploads and internal purposes."


Note:  I'm able to upload photos via "http"

---
** Debug Info **

USER:
------------------
Array
(
    [ID] => a03c657aded9f27da926fc25c6f5b0cd
    [am] => 1
    [lang] => english
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => Jeff
    [groups] => Array
        (
           
  • => 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] => 5
        [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
    (
       
  • => SELECT extension, mime, content, player FROM cpg140_filetypes; (0.001s)
        [1] => select * from cpg140_plugins order by priority asc; (0s)
        [2] => delete from `photos`.cpg140_sessions where time<1132947444 and remember=0; (0s)
        [3] => delete from `photos`.cpg140_sessions where time<1131741444; (0s)
        [4] => select user_id from `photos`.cpg140_sessions where session_id=md5("07bd146261914a9a779a3013587aa77e955698a6afad951617e4c76081e6a70f"); (0s)
        [5] => select user_id as id, user_password as password from `photos`.cpg140_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 `photos`.cpg140_users AS u INNER JOIN `photos`.cpg140_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
        [7] => SELECT user_group_list FROM `photos`.cpg140_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 cpg140_usergroups WHERE group_id in (1) (0.001s)
        [9] => SELECT group_name FROM  cpg140_usergroups WHERE group_id= 1 (0s)
        [10] => update `photos`.cpg140_sessions set time='1132951044' where session_id=md5('07bd146261914a9a779a3013587aa77e955698a6afad951617e4c76081e6a70f'); (0s)
        [11] => SELECT user_favpics FROM cpg140_favpics WHERE user_id = 1 (0s)
        [12] => DELETE FROM cpg140_banned WHERE expiry < '2005-11-25 12:37:24' (0s)
        [13] => SELECT * FROM cpg140_banned WHERE (ip_addr='127.0.0.1' OR ip_addr='127.0.0.1' OR user_id=1) AND brute_force=0 (0.001s)
        [14] => SELECT aid, title FROM cpg140_albums WHERE 1 (0s)
        [15] => SELECT COUNT(*) FROM cpg140_pictures WHERE approved = 'NO' (0s)
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 5.1.0 - OK
    ------------------
    mySQL version: 4.1.15-nt
    ------------------
    Coppermine version: 1.4.2(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
    XPM Support:
    XBM Support: 1
    JIS-mapped Japanese Font Support:

    ==========================
    Module: mysql
    ------------------
    MySQL Supportenabled
    Active Persistent Links 0
    Active Links 1
    Client API version 4.1.7
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Stream Wrapper support compress.zlib://
    Stream Filter support zlib.inflate, zlib.deflate
    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 | .;C:\php5\pear | .;C:\php5\pear
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | me@localhost.com | me@localhost.com
    sendmail_path | no value | no value
    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 | 2M | 2M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 0.144 seconds - 16 queries in 0.003 seconds - Album set : ; Meta set: ;
--


skidog326

No Problem, I will move my post.  Thank you again for your help with my previous issue!   :)
--