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 5616 times)

0 Members and 1 Guest are viewing this topic.

djfunk

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
There was an error while processing a database query
« on: April 01, 2005, 10:17:08 pm »

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................
Logged

Nibbler

  • Guest
Re: There was an error while processing a database query
« Reply #1 on: April 01, 2005, 10:28:27 pm »

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.
Logged

djfunk

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: There was an error while processing a database query
« Reply #2 on: April 02, 2005, 03:12:00 pm »

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?
Logged

Nibbler

  • Guest
Re: There was an error while processing a database query
« Reply #3 on: April 02, 2005, 03:15:22 pm »

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

djfunk

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: There was an error while processing a database query
« Reply #4 on: April 02, 2005, 03:31:07 pm »

cheers mate i will try to contact them
see ya
Logged

mrdavis494

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: There was an error while processing a database query
« Reply #5 on: April 22, 2005, 03:09:44 am »

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#
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 18 queries.