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: There was an error while processing a database query ....  (Read 8250 times)

0 Members and 1 Guest are viewing this topic.

Prisoner_24601

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 47
There was an error while processing a database query ....
« on: October 06, 2008, 07:22:59 pm »

Yes, I know: standard error :).

I'd get this error when trying to click the "JUpload Configuration" button under Plugins in the Plugin Manager.  I tried under multiple Admin accounts and themes and then I decided to DEBUG.

This button runs the following query:

Code: [Select]
CREATE TABLE IF NOT EXISTS cpg14x_jupload_session (
  session_id varchar(40) NOT NULL,
  jupload_session_id varchar(40) NOT NULL,
  ip tinytext    NOT NULL,
  valid_until datetime NOT NULL,
  user_name varchar(25) NOT NULL,
  user_data text NOT NULL,
  PRIMARY KEY  (session_id, jupload_session_id)
) TYPE=MyISAM COMMENT='Used to store JUpload sessions (used only for upload through the plugin, when sessionManagement configuration parameter is JUpload)';

The error in DEBUG said that the COMMENT was too long.

I manually ran the SQL query through phpMyAdmin, but set all the varchar amounts to 255 and deleted the COMMENT line.  I tried the "JUpload Configuration" button again and it worked just fine.

Dunno if anyone else is havening this problem or if it's just me (my configuration).  I searched and didn't see anything.

My compliments to etienne_sf on a beautiful plugin.  I'm going to get a lot of use out of it!

==========

My current config:
* Coppermine 1.4.19
* PHP 5.1.1
* MySQL client version: 4.1.7
* IIS  (Windows NT MIRAGE 5.2 build 3790)
* JUpload 3.2.4
Logged

etienne_sf

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 908
    • Wiki
Re: There was an error while processing a database query ....
« Reply #1 on: October 06, 2008, 10:25:23 pm »

Hi,

 Thanks .. and have a big use if it !



  You're the first to report this error.


It's the first time I see an application crash, because the comment is too long !!!!
;)


I changed it to Used to store JUpload sessions (see sessionManagement JUpload configuration parameter).

Can you check it on your system ?

Etienne
Logged

MarkRH

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: There was an error while processing a database query ....
« Reply #2 on: November 17, 2008, 04:51:30 am »

I'm trying out the program locally on my PC.. actually I'm evaluate Coppermine Gallery itself locally before setting it up on hosting service.  Anyway, I get "Critical error There was an error while processing a database query" when clicking on the Configuration Button. 

Same issue it would appear:
Code: [Select]
While executing query "
CREATE TABLE IF NOT EXISTS cpg14x_jupload_session (
  session_id varchar(40) NOT NULL,
  jupload_session_id varchar(40) NOT NULL,
  ip tinytext    NOT NULL,
  valid_until datetime NOT NULL,
  user_name varchar(25) NOT NULL,
  user_data text NOT NULL,
  PRIMARY KEY  (session_id, jupload_session_id)
) TYPE=MyISAM COMMENT='Used to store JUpload sessions (see sessionManagement JUpload configuration parameter)';
" on 0

mySQL error: Too long comment for table 'cpg14x_jupload_session'

I ran it locally using SQLYog, and it did create the table with 2 warnings and looks like it truncated the comment.  It's table creation looks like:

Code: [Select]
CREATE TABLE `cpg14x_jupload_session` (                                                                       
                          `session_id` varchar(40) NOT NULL,                                                                           
                          `jupload_session_id` varchar(40) NOT NULL,                                                                   
                          `ip` tinytext NOT NULL,                                                                                     
                          `valid_until` datetime NOT NULL,                                                                             
                          `user_name` varchar(25) NOT NULL,                                                                           
                          `user_data` text NOT NULL,                                                                                   
                          PRIMARY KEY  (`session_id`,`jupload_session_id`)                                                             
                        ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store JUpload sessions (see sessionManagement JUploa';

I'm running MySQL version 5.0.51b-community-nt

On further examination: http://dev.mysql.com/doc/refman/5.0/en/create-table.html
Shows the comment can be up to 60 characters.
« Last Edit: November 17, 2008, 05:11:24 am by MarkRH »
Logged

etienne_sf

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 908
    • Wiki
Re: There was an error while processing a database query ....
« Reply #3 on: November 17, 2008, 10:10:14 pm »

Right!

  On my database, the comment is :
Used to store JUpload sessions (used only for upload through

Which is also 61 characters long.

  Do you have anywhere a config that tell MySql to throw an error when a warning occurs ?


You can update the plugins/jupload/include/session.inc.php file, and change or remove the comment around the line 91.


Etienne
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 22 queries.