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: [Solved]: Error while processing a database query when using Admin Tools  (Read 7388 times)

0 Members and 1 Guest are viewing this topic.

CeeCee

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

I wasn't sure if this was the correct location for my problem, so sorry to the staff if I chose wrong.

On to my question..
I currently use Coppermine Photo Gallery v1.4.16 on my website, and have never had an issue out of my "Admin Tools" but for some reason I'm having issues now. All I'm trying to is update all the thumbnails in my gallery, which given is over 10,000+ images I've never had an issue before like this. Every time I go to update "All Albums" it will do as expected and change to the next page though sometimes it will say "There was an error while processing a database query." while other times it will work accordingly and update thumbnails then after a while it will again say "There was an error while processing a database query." leaving me no choice but to restart or pull my hair out, whichever.

I don't understand why it's suddenly doing this, I thought it was my MYSQL Database and even repaired it to no avail since I'm still getting this error. I've read a few threads on here so I went ahead and done the "Debug" mode so hopefully it will help whomever decides to help me. If there's anymore information needed just let me know.

Here is what the DEBUGGING Said:
Quote
While executing query "UPDATE cpg_pictures SET pwidth='450' , pheight='611' WHERE pid='150' " on 0

mySQL error: MySQL server has gone away

« Last Edit: July 13, 2008, 08:19:10 pm by Joachim Müller »
Logged

Nibbler

  • Guest
Re: Error while processing a database query when using Admin Tools
« Reply #1 on: June 21, 2008, 11:02:13 pm »

You can't get that message just by rebuilding the thumbnails. What exactly are you doing? Any mods installed?

Also, update to 1.4.18.
Logged

CeeCee

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Error while processing a database query when using Admin Tools
« Reply #2 on: June 21, 2008, 11:37:20 pm »

I realized I forgot to mention I was using the Stramm Mod. Though I'm doing the same steps I've always done, which resulted in no problems until now.

I go to Admin Tools >
I check "Update thumbs and/or resized photos (1)"
Then I check "Only thumbnails (mini and regular)"
Then all I do is go to the bottom and leave it on "All Albums" then click submit.

So I should update to 1.4.18? do you believe it will solve my problem?

Also I know I had an email from my host the other day, which mentioned upgrades to the servers, I've added a small snippet of what was sent to me to see if it might have an cause to this. Sorry if doesn't have any relation, I was just thinking of possibilities.

Quote
In order to keep Surpass' servers as up to date as possible, our administrative team will begin to reconfigure the server your website is hosted. After June 20, 2008 MYSQL 5 will be the default version of MYSQL, and PHP 5 will be the default version of PHP. These newest versions of MYSQL and PHP have already been tested and are currently installed on our newest servers. This update has caused no new issues to those servers and the clients on those servers.

PHP 5 is the default version to parse documents ending with the following extensions:

.php
.phps
.phtml
.php5

This change will occur for the server which hosts your website, on June 20, 2008 at 11:59 PM EST.

Most applications should run perfectly fine under MYSQL 5 as well as PHP5, however some of our clients may find that their applications do not work properly and require MYSQL 4 or PHP 4. It is recommended that you check with your application vendors to ensure that the application is compatible with version 5, and update your software if necessary.

If no updates are available for the software you are using, you will be able to continue using PHP 4. On the day of the change (June 20, 2008), place the following commands into a file named '.htaccess' under the root directory for the application which requires PHP version 4.

You may also change the version of PHP inside your cPanel. You may do this by first logging into your cPanel account. Then navigate to the link named "PHP Configuration". Once there, there will be a drop down menu at the top that will allow you to change the default version of PHP.
Logged

CeeCee

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Error while processing a database query when using Admin Tools
« Reply #3 on: June 22, 2008, 06:54:06 pm »

Also I've upgraded to version 1.4.18 and also added the 1.4.18 version of Stramm as well and I'm still receiving this error.
Logged

nyccali9

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Error while processing a database query when using Admin Tools
« Reply #4 on: July 07, 2008, 06:06:19 am »

I'm having this issue right now.  Is there anything to solve this.  I'm updating my thumbnails and I keep receiving this error. 
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error while processing a database query when using Admin Tools
« Reply #5 on: July 07, 2008, 08:12:26 am »

Talk to your webhost for more info, ask for the error log. Maybe it contains useful info.

nyccali9

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Error while processing a database query when using Admin Tools
« Reply #6 on: July 08, 2008, 01:12:48 am »

The host replied with they do not provide support for outside sourced programs.  The problem continues.  Please provide some insight. 
Logged

nyccali9

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Error while processing a database query when using Admin Tools
« Reply #7 on: July 08, 2008, 02:00:40 am »

Code: [Select]
While executing query "UPDATE cpg_pictures SET pwidth='2400' , pheight='3600' WHERE pid='5030' " on 0

mySQL error: MySQL server has gone away
4
Code: [Select]
USER:
------------------
Array
(
    [ID] => 32b4c1f11291fc180c64dc9168c15d1b
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

    [lap] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => ***
    [groups] => Array
        (
            [0] => 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
(
    [0] => SELECT extension, mime, content, player FROM cpg_filetypes; (0s)
    [1] => select * from cpg_plugins order by priority asc; (0s)
    [2] => delete from `***`.cpg_sessions where time<1215471219 and remember=0; (0s)
    [3] => delete from `***_copp2`.cpg_sessions where time<1214265219; (0s)
    [4] => select user_id from `***_copp2`.cpg_sessions where session_id = '3eae78657e728887566bd42554536e23' (0s)
    [5] => select user_id as id, user_password as password from `***_copp2`.cpg_users where user_id=1 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.avatar_url AS avatar_url, u.enable_admin_email AS notify, u.auto_subscribe_post AS auto_subscribe_post, u.auto_subscribe_comment AS auto_subscribe_comment, u.user_group+100 AS group_id FROM `***_copp2`.cpg_users AS u INNER JOIN `***_copp2`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `***_copp2`.cpg_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 cpg_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0s)
    [10] => update `***_copp2`.cpg_sessions set time='1215474819' where session_id = '3eae78657e728887566bd42554536e23' (0s)
    [11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
    [12] => SELECT count(*) FROM  cpg_pms WHERE owner=1 (0s)
    [13] => SELECT count(*) FROM  cpg_pms WHERE owner=1 AND showed='0' (0s)
    [14] => SELECT count(*) FROM  cpg_buddy WHERE user_id=1 (0s)
    [15] => SELECT count(*) FROM  cpg_buddy_req WHERE buddy_to=1 (0s)
    [16] => DELETE FROM cpg_banned WHERE expiry < '2008-07-07 23:53:39' (0s)
    [17] => SELECT * FROM cpg_banned WHERE (ip_addr='74.71.112.119' OR ip_addr='74.71.112.119' OR user_id=1) AND brute_force=0 (0s)
    [18] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0.002s)
    [19] => SELECT * FROM cpg_pictures WHERE aid = 173 LIMIT 0, 5 (0s)
    [20] => UPDATE cpg_pictures SET pwidth='2400' , pheight='3600' WHERE pid='5030'  (0s)
)

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

==========================
POST :
------------------
Array
(
    [action] => update_thumbs
    [updatetype] => 0
    [numpics] => 5
    [autorefresh] => 1
    [parsemode] => 0
    [refresh_numpics] => 5
    [albumid] => 173
)

==========================
VERSION INFO :
------------------
PHP version: 5.2.6 - OK
------------------
mySQL version:
------------------
Coppermine version: 1.4.18(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 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
XPM Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.51a
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.1.2
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 | dl | dl
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
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 | 64M | 64M
post_max_size | 64M | 64M
==========================
Page generated in 35.87 seconds - 21 queries in 0.002 seconds - Album set : ; Meta set: ;
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error while processing a database query when using Admin Tools
« Reply #8 on: July 08, 2008, 07:39:14 am »

My only guess would be a to large pic (timeout).

PS: If that's your hosts answer and they won't give out error logs, then it's better to look for one with better support.

Nibbler

  • Guest
Re: Error while processing a database query when using Admin Tools
« Reply #9 on: July 08, 2008, 09:27:54 am »

First, try http://forum.coppermine-gallery.net/index.php/topic,49113.msg235830.html#msg235830
If that doesn't work then maybe Stramm can modify his util.php to not update the pwidth and pheight when all you are doing is rebuilding thumbs. It's not needed anyway.
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error while processing a database query when using Admin Tools
« Reply #10 on: July 08, 2008, 09:41:28 am »

Needed cause you can change fullsized size if a backup image is available (watermarking enabled). Eventually it works if the number of processed images per batch's gettinmg reduced to 3-5 or even less. nyccali9, you may want to try that.

nyccali9

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Error while processing a database query when using Admin Tools
« Reply #11 on: July 09, 2008, 03:20:37 am »

still did not work.  Is there a way I can change the sizes until after i update my thumbnails and then just change it back.  It seems like it is timing out on the big pictures. 
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error while processing a database query when using Admin Tools
« Reply #12 on: July 09, 2008, 07:49:01 am »

are you still able to upload such big pictures?

nyccali9

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Error while processing a database query when using Admin Tools
« Reply #13 on: July 10, 2008, 03:52:26 am »

Yes but only via batch adding.
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error while processing a database query when using Admin Tools
« Reply #14 on: July 10, 2008, 07:30:56 am »

As Nibbler suggested we could disable the code to recalculate and save the fullsized images size. That's only necessary if you change its size.

find
Code: [Select]
        $imagesize = getimagesize($image);
$query_up = "UPDATE {$CONFIG['TABLE_PICTURES']} SET pwidth='$imagesize[0]' , pheight='$imagesize[1]' WHERE pid='".$row['pid']."' ";
cpg_db_query($query_up);
and comment it out
Code: [Select]
/*
        $imagesize = getimagesize($image);
$query_up = "UPDATE {$CONFIG['TABLE_PICTURES']} SET pwidth='$imagesize[0]' , pheight='$imagesize[1]' WHERE pid='".$row['pid']."' ";
cpg_db_query($query_up);
*/

nyccali9

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Error while processing a database query when using Admin Tools
« Reply #15 on: July 13, 2008, 07:44:40 pm »

perfect!  It worked like a charm! Thanks so much!
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.