coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: simplythi on December 18, 2004, 07:48:23 AM

Title: unexpected database failure.
Post by: simplythi on December 18, 2004, 07:48:23 AM
Hello today I checked my site and i got this error

There was an error while processing a database query

This came out of no where. The site was running smoothly with 500 users and growing, I dont know how to fix this situation. Does anyone know how to solve it?
Title: Re: unexpected database failure.
Post by: Casper on December 18, 2004, 11:53:38 AM
What query failed, when doing what?
If you don't know, turn on debug mode, and see what the output is.

A link would be useful.
Title: Re: unexpected database failure.
Post by: lusty_wizard on December 18, 2004, 05:42:34 PM
I get the exact same error message on my gallery... weird, as everything worked perfect up to yesterday... ???  My servers administrator said, he upgraded the PHP version, though. Maybe there's an issue with that?

The link is: http://www.sebastianschneider.net/gallery/ (in german by default)

How do I turn on debug mode? I guess in the web-configuration interface? Then it is impossible to turn it on, although I can login, using the different functions (including the configuration interface) produces more or less garbage. There are no other users than admin registered and I'm somewhar reluctant giving away the password.

Anyone can help? Thanks in advance!
Title: Re: unexpected database failure.
Post by: Casper on December 18, 2004, 05:59:02 PM
Use your database tool to change the database setting to turn on debug mode.

In the config table, find 'debug_mode' and change the value to 1.

You should then see a more detailed error.

if your host has changed php to version 5, this could be the cause of the problem.  It does work when properly compiled.
Title: Re: unexpected database failure.
Post by: crazybob on December 18, 2004, 07:51:25 PM
hi i've experienced the same problem too, when debugging it, it refers to the function.ini file which includes teh follow
$total_query_time += $qtime;
i tried breaking it down into two steps, but i uploaded it and it still says its buggered. its definitely a 4.3.10 update related problem but i dont know how to fix it
Title: Re: unexpected database failure.
Post by: Casper on December 18, 2004, 08:08:34 PM
I'm sure I saw a post about that recently.  Do a search for '$total_query_time += $qtime;'
Title: Re: unexpected database failure.
Post by: crazybob on December 18, 2004, 08:14:23 PM
Quote from: GauGau on December 16, 2004, 08:54:01 AM
line 1334 of functions.inc.php reads for me             $total_query_time += $qtime;If it's the same for you, you could easily make this a two-step process, like this            $total_query_time = $total_query_time + $qtime;

Joachim

that one.....i tried doing that, doesnt work
Title: Re: unexpected database failure.
Post by: crazybob on December 18, 2004, 08:22:33 PM
This is the detailed error displayed from using debug mode. line 1342 for me points to the query time code i previously talked about

"While executing query "SELECT aid FROM cpg132_albums WHERE category = " on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Fatal error: Unsupported operand types in /home/crazyorg/public_html/gallery/include/functions.inc.php on line 1342"
Title: Re: unexpected database failure.
Post by: Nibbler on December 19, 2004, 02:13:37 AM
The problem is with the Zend Optimizer, as mentioned on their respective sites:

php:

Note: Due to a problem with earlier versions of Zend Optimizer, its users are urged to upgrade to the  latest version.

zend:

Note: Zend Optimizer users will need to upgrade to the latest version in order for it to work with PHP 4.3.10.

So - update to 2.5.7 or disable zend until you do update.
Title: Re: unexpected database failure.
Post by: crazybob on December 19, 2004, 02:28:24 AM
ooh thank you for your reply :)

how would i disable/upgrade it? i dont think i have apache access or anything, hosting company is in control with most of that... so shall i just email them for upgrade/disablage?
Title: Re: unexpected database failure.
Post by: Nibbler on December 19, 2004, 02:40:46 AM
Yes, go moan at them . :)
Title: Re: unexpected database failure.
Post by: melban on December 21, 2004, 05:45:53 AM
Crazybob how did you ever get your host to get around this I think I've got the same problem
Title: Re: unexpected database failure.
Post by: Tranz on December 21, 2004, 05:54:46 AM
It's likely your host is aware but wants to make sure that doing the upgrade won't break anything else.
Title: Re: unexpected database failure.
Post by: wickedsun on December 22, 2004, 03:10:34 AM
This sounds like my problem, yes? I use 4.3.8? Problem happened today.
My webhost has:
apache version 1.3.33 Unix
MySQL 4.0.22
PhP Version 4.3.8
Operating system - Linux

My error message:
There was an error while processing a database query.

While executing query "SELECT aid FROM cpg132_albums WHERE category = " on 0
mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

File: /home/yocumco/public_html/family/fphoto/include/functions.inc.php - Line: 105


Fatal error: Unsupported operand types in /home/yocumco/public_html/family/fphoto/include/functions.inc.php on line 1334
Title: Re: unexpected database failure.
Post by: Joachim Müller on December 22, 2004, 04:33:19 PM
update your zend optimizer!

Joachim
Title: Re: unexpected database failure.
Post by: Pestilence on January 14, 2005, 01:31:10 AM
HI i am getting this error also on my site http://www.audrygroenow.com  this was working fineand the error just started showing up. My host does have zend optimizer 2.5.7 and php is 4.3.10 i am on a windows server and i cant figure out for the life of me why this wont work.....Please help this is a In Memory Of site for a friend of mine who past away and we are using it to display photos of him for his family who is out side the country.

Thanks in advance
Title: Re: unexpected database failure.
Post by: Joachim Müller on January 14, 2005, 07:56:56 AM
enable debug_mode to see the actual error.

Joachim
Title: Re: unexpected database failure.
Post by: Pestilence on January 14, 2005, 10:09:22 AM
While executing query "SELECT aid FROM cpg132_albums WHERE category = " on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

audrygroenow.com\include\functions.inc.php - Line: 105

Title: Re: unexpected database failure.
Post by: kegobeer on January 14, 2005, 05:45:24 PM
Contact your host and tell them the error you are getting.  If it worked before and doesn't now, then they did (or didn't do) something they should have.  Do a phpinfo and verify the versions, and then have your host verify they correctly performed the upgrades and didn't forget to enable something in php.ini.

Sorry, but it does look like this is a misconfiguration problem.