Advanced search  

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

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

skidog326

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6

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!!
« Last Edit: November 25, 2005, 10:20:09 pm by Nibbler »
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 #1 on: November 25, 2005, 12:53:41 pm »

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.
Logged

skidog326

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Critical error: There was an error while processing a database query...
« Reply #2 on: November 25, 2005, 01:14:38 pm »

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….

Logged
--

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Critical error: There was an error while processing a database query...
« Reply #3 on: November 25, 2005, 01:25:23 pm »

Enable debug mode and post the actual SQL error message.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Critical error: There was an error while processing a database query...
« Reply #4 on: November 25, 2005, 06:49:41 pm »

** 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: ;
Logged
--

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Critical error: There was an error while processing a database query...
« Reply #5 on: November 25, 2005, 07:46:32 pm »

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 ''
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Critical error: There was an error while processing a database query...
« Reply #6 on: November 25, 2005, 09:47:35 pm »

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

Nibbler

  • Guest
Re: Critical error: There was an error while processing a database query...
« Reply #7 on: November 25, 2005, 10:19:57 pm »

One issue per thread please.
Logged

skidog326

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Critical error: There was an error while processing a database query...
« Reply #8 on: November 25, 2005, 10:37:04 pm »

No Problem, I will move my post.  Thank you again for your help with my previous issue!   :)
Logged
--
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.