coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: skidog326 on November 25, 2005, 12:39:27 PM

Title: Critical error: There was an error while processing a database query...
Post by: skidog326 on November 25, 2005, 12:39:27 PM
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!!
Title: Re: Critical error: There was an error while processing a database query...
Post by: Joachim Müller 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.
Title: Re: Critical error: There was an error while processing a database query...
Post by: skidog326 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....

Title: Re: Critical error: There was an error while processing a database query...
Post by: kegobeer on November 25, 2005, 01:25:23 PM
Enable debug mode and post the actual SQL error message.
Title: Re: Critical error: There was an error while processing a database query...
Post by: skidog326 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
        (
           
Title: Re: Critical error: There was an error while processing a database query...
Post by: kegobeer 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 ''
Title: Re: Critical error: There was an error while processing a database query...
Post by: skidog326 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
        (
           
Title: Re: Critical error: There was an error while processing a database query...
Post by: Nibbler on November 25, 2005, 10:19:57 PM
One issue per thread please.
Title: Re: Critical error: There was an error while processing a database query...
Post by: skidog326 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!   :)