Critical error Critical error
 

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

Started by rterburg, August 10, 2007, 05:27:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rterburg

When I click on the random image bar I get the following message:

Critical error
There was an error while processing a database query


Does anyone know how to solve this problem? When I try to display the same pictures trough the albums everything works okay.

Thanks in advance.

Rgds,
~Ron~
www.terburg.net, Dutch landscape- and naturephotography

rterburg

#1
Quote from: rterburg on August 10, 2007, 05:27:33 PM
When I click on the random image bar I get the following message:

Critical error
There was an error while processing a database query


Does anyone know how to solve this problem? When I try to display the same pictures trough the albums everything works okay.

Thanks in advance.

Rgds,


This is the message in the debug mode:

[tt]USER:
------------------
Array
(
    [ID] => 674fce1a18b599aedb61d266f669e647
    [am] => 1
    [lang] => dutch
    [liv] => Array
        (
            [0] => 602
            [1] => 558
            [2] => 608
            [3] => 574
            [4] => 610
        )

    [search] => Array
        (
            [search] => lauwers
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 63
    [user_name] => Ron ter Burg
    [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 gallery_filetypes; (0.001s)
    [1] => select * from gallery_plugins order by priority asc; (0.001s)
    [2] => SELECT * FROM gallery_bridge (0.001s)
    [3] => 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 gallery_usergroups WHERE group_id in (1) (0.001s)
    [4] => SELECT group_name FROM  gallery_usergroups WHERE group_id= 1 (0s)
    [5] => SELECT user_favpics FROM gallery_favpics WHERE user_id = 63 (0.001s)
    [6] => DELETE FROM gallery_banned WHERE expiry < '2007-08-10 16:32:47' (0.001s)
    [7] => SELECT * FROM gallery_banned WHERE (ip_addr='89.220.75.234' OR ip_addr='89.220.75.234' OR user_id=63) AND brute_force=0 (0s)
    [8] => SELECT aid from gallery_pictures WHERE pid='284'  LIMIT 1 (0.001s)
    [9] => SELECT title,keyword from gallery_albums WHERE aid='3' (0.001s)
    [10] => SELECT COUNT(*) from gallery_pictures WHERE ((aid='3'  ) )   (0.001s)
    [11] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, title, caption,hits,owner_id,owner_name from gallery_pictures WHERE ((aid='3'  ) )   ORDER BY pid DESC  (0.005s)
    [12] => SELECT title,keyword from gallery_albums WHERE aid='3' (0s)
    [13] => SELECT COUNT(*) from gallery_pictures WHERE ((aid='3'  ) )   (0s)
    [14] => SELECT * from gallery_pictures WHERE ((aid='3'  ) )   ORDER BY pid DESC  LIMIT 117 ,1 (0.004s)
    [15] => SELECT title, comments, votes, category, aid FROM gallery_albums WHERE aid='3' LIMIT 1 (0.003s)
    [16] => SELECT COUNT(*) from gallery_pictures WHERE approved = 'YES'  (0.001s)
    [17] => SELECT * FROM gallery_pictures WHERE approved = 'YES'  ORDER BY RAND() LIMIT -1 (0s)
    [18] => SELECT COUNT(*) FROM gallery_pictures WHERE approved = 'NO' (0.001s)
)

==========================
GET :
------------------
Array
(
    [album] => random
    [cat] => 0
    [pos] => -284
)

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

==========================
VERSION INFO :
------------------
PHP version: 4.4.6 - OK
------------------
mySQL version: 5.0.24-standard
------------------
Coppermine version: 1.4.12(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 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
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 3
Client API version 5.0.24
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
Compiled Version 1.2.1.2
Linked Version 1.2.1.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | On
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 | chown, passthru, system, shell_exec ,proc_close,proc_open,ini_alter,dl,popen | chown, passthru, system, shell_exec ,proc_close,proc_open,ini_alter,dl,popen
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | /home/terburg:/usr/lib/php:/usr/local/lib/php:/tmp | 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 | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.428 seconds - 19 queries in 0.023 seconds - Album set : ; Meta set: ;[/tt]
~Ron~
www.terburg.net, Dutch landscape- and naturephotography

Nibbler

Post the actual error message, not  the debug output.

rterburg

Quote from: Nibbler on August 10, 2007, 05:52:47 PM
Post the actual error message, not  the debug output.

This is the error message:

While executing query "SELECT * FROM gallery_pictures WHERE approved = 'YES'  ORDER BY RAND() LIMIT -1" on 0

mySQL error:


File: /home/terburg/public_html/gallery/include/functions.inc.php - Line: 249
~Ron~
www.terburg.net, Dutch landscape- and naturephotography

Nibbler

Are you using any mods or plugins?

rterburg

Quote from: Nibbler on August 10, 2007, 06:09:11 PM
Are you using any mods or plugins?

I have bridged Coppermine in Joomla with the Mehdi Joomla-Coppermine bridge (http://www.mehdiplugins.com/misc/).
I am using the Viper guestbook in Coppermine.

Theme: Classic.

That's all.
~Ron~
www.terburg.net, Dutch landscape- and naturephotography

Ben.Hahlen

Got the same problem. Occurred after the upgrade to 1.4.12
Using e107 bridge and the corresponding theme.
Only "plugin" I'm using is the lightbox, but that's all in the theme-code (theme: e107 provided with the bridge).

Any resolution on this?

Nibbler

Can anyone reproduce this issue without using 3rd party bridges?

spider666

I have exactely the same error. I also use the bridge for joomla. Any idee how to sove this ?

Joachim Müller

You just got a "critical error" I presume. That's a generic error message. Enable debug_mode to see the real error message and then post it here (the error message, not the debug_output). Posting a link to your page might help as well.

spider666

Ok, I had to put back an old  include/function.inc.php (1.4.12) to solve my problem and have the random function running without error.

Now I have a similar error when I add a comment (this has never running good even with the new or old function.inc.php). I don't know if I have to open a new thread but feel free to split it if necessary.

So, when I add a comment, I'm not driving to the picture page when I validate my comment but on the generic error page. By chance, when I go manually on the picture page, I can see that the comment is entered

Here is the error:

The selected album/file does not exist ! 
File: mydomain.../cpg/include/functions.inc.php - Line: 1335

There is no public access on my site but I can send you a link via pm if you have time to check it out

Thanks for your help JM

Joachim Müller

Well, then your issue is completely different from the one the orginal thread starter reported. You shouldn't have hijacked this thread. Closing, locking. And no, thanks: no PMs - if you can't post publicly, then don't post at all. The Joomla port/bridge goes unsupported anyway, and the error message should be quite self-explanatory.