There was an error while processing a database query There was an error while processing a database query
 

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

Main Menu

There was an error while processing a database query

Started by djfunk, April 01, 2005, 10:17:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

djfunk

hi guys I have been having a version of coppermine photo gallery ( I dont remembere the version) for one year now, but yesterday I got this message "There was an error while processing a database query " when I try to get into the gallery http://lnx.eventidivertenti.it/gallery/index.php
It has been everything ok up to yesterday but now I dont know what happening, I hope that somebody can help me 
PLEASE................

Nibbler

You need to enable debug mode, and then post the actual mysql error message you get.  If you can't get to your config section, you'll  have to use phpMyAdmin to change the cpgxxx_config table entry "debug_mode" from 0 to 1.

djfunk

hi nibbler thanks for your prompt response, I go to phpmyadmin and i go on cpgxxx_config to edit debug_mode. I enter the value 1 and press enter but I get an error message like this "#1044 - Access denied for user: 'Sql38242@%' to database 'Sql38242_1' "
The value of the debug mode is always 0
Do you have any suggestions?

Nibbler

If your database username does not have the neccessary permissions to update your database you would need to resolve that with your host.

djfunk


mrdavis494

I suddenly started getting the same error - after turning on debug mode I found out what was wrong.

The directory I had my pictures in had a single quote (') in the directory name.  I had recently turned on "Display EXIF info" setting and completely forgot.

Anyway - I was getting an INSERT error when I would look at a picture in the offending directory - turns out - I have 60+ directories with single quotes - shame on me.

I modified 2 lines in /include/exif_php.inc.php, adding single quotes inside the double quotes - see the diff output below:

me@myserver:/var/www/html/familypics/include# diff exif_php.inc.php-orig exif_php.inc.php
31c31
<                   "WHERE filename = \"$filename\"";
---
>                   "WHERE filename = \"'$filename'\"";
82c82
<                   "VALUES ('$filename', '".addslashes(serialize($exifParsed))."')";
---
>                   "VALUES (\"'$filename'\", '".addslashes(serialize($exifParsed))."')";
me@myserver:/var/www/html/familypics/include#