G3 Beta1 install error (Uncaught Kohana_Database_Exception)

ASNet0007

Joined: 2006-10-17
Posts: 177
Posted: Wed, 2009-06-10 10:46

Hi,
The database setup/install part works ok but when I go to my site it errors.

In the Var log I get

Quote:
<?php defined('SYSPATH') or die('No direct script access.'); ?>

2009-06-10 11:38:39 +01:00 --- error: Uncaught Kohana_Database_Exception: There was an SQL 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 '} SET `view_count` = `view_count` + 1 WHERE `id` = 1' at line 1 - UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = 1 in file system/libraries/drivers/Database/Mysqli.php on line 142

and on the website I get

Quote:
Dang... Something went wrong!
We tried really hard, but it's broken. Hey wait, you're an admin! We can tell you stuff.
Ok.. tell me stuff!
Help!
If this stuff doesn't make any sense to you, ask for help in the Gallery forums!

So here's the error:
There was an SQL 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 '} SET `view_count` = `view_count` + 1 WHERE `id` = 1' at line 1 - UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = 1
File: system/libraries/drivers/Database/Mysqli.php, line: 142

And here's how we got there:
C:\wamp\www\gallery3\system\libraries\drivers\Database\Mysqli.php [90]:
Kohana_Mysqli_Result->__construct( mysqli Object
(
)
, 1, UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = 1 )
C:\wamp\www\gallery3\system\libraries\Database.php [259]:
Database_Mysqli_Driver->query( UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = 1 )
C:\wamp\www\gallery3\modules\gallery\libraries\MY_Database.php [56]:
Database_Core->query( UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = 1 )
C:\wamp\www\gallery3\modules\gallery\controllers\albums.php [79]:
Database->query( UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = 1 )
C:\wamp\www\gallery3\modules\gallery\controllers\rest.php [91]:
Albums_Controller->_show( Item_Model Object
(
[children:protected] => items
[view_restrictions:private] => Array
(
)

[sorting:protected] => Array
(
)

[rules] => Array
(
[name] => required|length[0,255]
[title] => required|length[0,255]
[description] => length[0,65535]
)

[model_name:private] => item
[has_one:protected] => Array
(
)

[belongs_to:protected] => Array
(
)

[has_many:protected] => Array
(
)

[has_and_belongs_to_many:protected] => Array
(
)

[load_with:protected] => Array
(
)

[object:protected] => Array
(
[id] => 1
[album_cover_item_id] =>
[captured] =>
[created] => 1244471353
[description] =>
[height] =>
[left] => 1
[level] => 1
[mime_type] =>
[name] =>
[owner_id] =>
[parent_id] => 0
[rand_key] =>
[relative_path_cache] =>
[resize_dirty] => 1
[resize_height] =>
[resize_width] =>
[right] => 2
[sort_column] => weight
[sort_order] => ASC
[thumb_dirty] => 1
[thumb_height] =>
[thumb_width] =>
[title] => Gallery
[type] => album
[updated] => 1244471353
[view_count] => 0
[weight] => 1
[width] =>
[view_1] => 1
[view_2] => 1
)

[changed:protected] => Array
(
)

[related:protected] => Array
(
)

[loaded:protected] => 1
[saved:protected] => 1
[object_relations:protected] => Array
(
)

[changed_relations:protected] => Array
(
)

[object_name:protected] => item
[object_plural:protected] => items
[table_name:protected] => items
[table_columns:protected] => Array
(
[id] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[sequenced] => 1
)

[album_cover_item_id] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[captured] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[created] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[description] => Array
(
[type] => string
[length] => 2048
[null] => 1
)

[height] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[left] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)

[level] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)

[mime_type] => Array
(
[type] => string
[length] => 64
[null] => 1
)

[name] => Array
(
[type] => string
[length] => 255
[null] => 1
)

[owner_id] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[parent_id] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)

[rand_key] => Array
(
[type] => float
[null] => 1
)

[relative_path_cache] => Array
(
[type] => string
[length] => 255
[null] => 1
)

[resize_dirty] => Array
(
[type] => int
[max] => 127
[unsigned] =>
[null] => 1
)

[resize_height] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[resize_width] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[right] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)

[sort_column] => Array
(
[type] => string
[length] => 64
[null] => 1
)

[sort_order] => Array
(
[type] => string
[exact] => 1
[length] => 4
[null] => 1
)

[thumb_dirty] => Array
(
[type] => int
[max] => 127
[unsigned] =>
[null] => 1
)

[thumb_height] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[thumb_width] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[title] => Array
(
[type] => string
[length] => 255
[null] => 1
)

[type] => Array
(
[type] => string
[length] => 32
)

[updated] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[view_count] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[weight] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)

[width] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)

[view_1] => Array
(
[type] => int
[max] => 32767
[unsigned] =>
)

[view_2] => Array
(
[type] => int
[max] => 32767
[unsigned] =>
)

)

[ignored_columns:protected] =>
[primary_key:protected] => id
[primary_val:protected] => name
[foreign_key:protected] => Array
(
)

[table_names_plural:protected] => 1
[reload_on_wakeup:protected] => 1
[db:protected] => Database Object
(
[_table_names:protected] => Array
(
[{g3access_caches}] => g3access_caches
[{g3access_intents}] => g3access_intents
[{g3comments}] => g3comments
[{g3graphics_rules}] => g3graphics_rules
[{g3groups}] => g3groups
[{g3groups_users}] => g3groups_users
[{g3incoming_translations}] => g3incoming_translations
[{g3items}] => g3items
[{g3items_tags}] => g3items_tags
[{g3logs}] => g3logs
[{g3messages}] => g3messages
[{g3modules}] => g3modules
[{g3outgoing_translations}] => g3outgoing_translations
[{g3permissions}] => g3permissions
[{g3search_records}] => g3search_records
[{g3sessions}] => g3sessions
[{g3tags}] => g3tags
[{g3tasks}] => g3tasks
[{g3themes}] => g3themes
[{g3users}] => g3users
[{g3vars}] => g3vars
)

[config:protected] => Array
(
[benchmark] =>
[persistent] =>
[connection] => Array
(

)

[character_set] => utf8
[table_prefix] => G3
[object] => 1
[cache] =>
[escape] => 1
)

[driver:protected] => Database_Mysqli_Driver Object
(
[link:protected] => mysqli Object
(
)

[db_config:protected] => Array
(
[benchmark] =>
[persistent] =>
[connection] => Array
(

)

[character_set] => utf8
[table_prefix] => G3
[object] => 1
[cache] =>
[escape] => 1
)

[statements:protected] => Array
(
)

[query_cache:protected] =>
)

[link:protected] => mysqli Object
(
)

[select:protected] => Array
(
)

[set:protected] => Array
(
)

[from:protected] => Array
(
)

[join:protected] => Array
(
)

[where:protected] => Array
(
)

[orderby:protected] => Array
(
)

[order:protected] => Array
(
)

[groupby:protected] => Array
(
)

[having:protected] => Array
(
)

[distinct:protected] =>
[limit:protected] =>
[offset:protected] =>
[last_query:protected] => SELECT `key`, `translation`
FROM (`G3outgoing_translations`)
WHERE `locale` = 'en_US'
[query_history:protected] => Array
(
)

)

[db_applied:protected] => Array
(
[where] => where
[orderby] => orderby
[limit] => limit
[offset] => offset
)

[with_applied:protected] => Array
(
)

)
)
REST_Controller->__call( 1 )
C:\wamp\www\gallery3\system\core\Kohana.php [291]:
ReflectionMethod->invokeArgs( Albums_Controller Object
(
[resource_type:protected] => item
[uri] => URI Object
(
)

[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] =>
[ip_address] =>
)

)
, Array
(
[0] => 1
[1] => Array
(
)

)
)
Kohana::instance( )
C:\wamp\www\gallery3\system\core\Event.php [209]:
call_user_func( Array
(
[0] => Kohana
[1] => instance
)
)
C:\wamp\www\gallery3\system\core\Bootstrap.php [55]:
Event::run( system.execute )
C:\wamp\www\gallery3\index.php [72]:
require( C:\wamp\www\gallery3\system\core\Bootstrap.php )

 
msjonker

Joined: 2009-06-11
Posts: 1
Posted: Thu, 2009-06-11 13:15

I am getting the same error using Windows Server 2008, PHP 5.2.9, and MySQL 5.1.

 
ASNet0007

Joined: 2006-10-17
Posts: 177
Posted: Thu, 2009-06-11 13:46

Good point I should have added that I am using Windows XP with WAMP

Apache 2.2.11
MySQL 5.1.33
PHP 5.2.9-2

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-12 08:52

Sorry, we don't support Windows currently. Unix only.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
Ranger187
Ranger187's picture

Joined: 2005-12-02
Posts: 204
Posted: Tue, 2009-07-21 01:08

I'm running them fine on 2008 32/64bits, 2008R2 32/64, Server 2003 64bit...

WAMP or IIS makes no difference.

But I do have a 5 meg error log for Bharat ;)

 
Ranger187
Ranger187's picture

Joined: 2005-12-02
Posts: 204
Posted: Thu, 2009-07-23 20:30

This error was fixed by:

Try this:
1) get the latest code
2) go to Admin > Maintenance and cancel all jobs, and delete old jobs
3) run the g2 import again

If you weren't importing, just install the latest code.