Drupal and G2 - Fatal Error: You have an error in your SQL syntax

crux19

Joined: 2003-11-04
Posts: 94
Posted: Wed, 2005-10-26 16:51

Gallery version = 2.0.1+ core 1.0.7
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix) PHP/4.3.11
Database = mysqlt 4.1.12
Toolkits = ArchiveUpload, Exif, Ffmpeg, ImageMagick, NetPBM, Thumbnail
Operating system = FreeBSD localhost.localdomain 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May 8 10:21:06 UTC 2005

:/usr/obj/usr/src/sys/GENERIC i386
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

Hello,
I recently followed the directions on installing and integrating gallery2 and drupal form scratch (http://codex.gallery2.org/index.php/Gallery2:How_to_Embed_Gallery2_in_Drupal). I am using the module from cvs today. Everything was going well until I tried to activate the block. I get the following errors. Help is greatly appreciated. Thanks!

warning: in_array(): Wrong datatype for second argument in /usr/local/www/data-dist/modules/gallery.module on line 376.

Fatal 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 ')) AND g2_AccessMap.g_permission & 1 = 1' at line 8 query: INSERT INTO watchdog (uid, type, message, severity, link, location, hostname, timestamp) VALUES (1, 'php', 'in_array(): Wrong datatype for second argument in /usr/local/www/data-dist/modules/gallery.module on line 376.', 2, '', '/?q=admin/settings/gallery', '205.170.140.174', 1130344394) in /usr/local/www/data-dist/includes/database.mysql.inc on line 70
Call Stack
# Function Location
1 {main}() /usr/local/www/data-dist/index.php:0
2 menu_execute_active_handler() /usr/local/www/data-dist/index.php:18
3 call_user_func_array () /usr/local/www/data-dist/includes/menu.inc:354
4 system_site_settings() /usr/local/www/data-dist/includes/menu.inc:354
5 theme() /usr/local/www/data-dist/modules/system.module:605
6 call_user_func_array () /usr/local/www/data-dist/includes/theme.inc:190
7 xtemplate_page() /usr/local/www/data-dist/includes/theme.inc:190
8 theme() /usr/local/www/data-dist/themes/engines/xtemplate/xtemplate.engine:190
9 call_user_func_array () /usr/local/www/data-dist/includes/theme.inc:194
10 theme_blocks() /usr/local/www/data-dist/includes/theme.inc:194
11 module_invoke() /usr/local/www/data-dist/includes/theme.inc:864
12 call_user_func_array () /usr/local/www/data-dist/includes/module.inc:182
13 block_list() /usr/local/www/data-dist/includes/module.inc:182
14 module_invoke() /usr/local/www/data-dist/modules/block.module:502
15 call_user_func_array () /usr/local/www/data-dist/includes/module.inc:182
16 gallery_block() /usr/local/www/data-dist/includes/module.inc:182
17 gallery_error() /usr/local/www/data-dist/modules/gallery.module:198

18 in_array () /usr/local/www/data-dist/modules/gallery.module:376
19 error_handler() /usr/local/www/data-dist/includes/common.inc:376
20 watchdog() /usr/local/www/data-dist/includes/common.inc:387
21 db_query() /usr/local/www/data-dist/includes/bootstrap.inc:600
22 _db_query() /usr/local/www/data-dist/includes/database.inc:156
23 trigger_error () /usr/local/www/data-dist/includes/database.mysql.inc:70

 
crux19

Joined: 2003-11-04
Posts: 94
Posted: Wed, 2005-10-26 17:16

think I figured it out. I logged out of admin, logged in with a normal user, and then logged out of the normal user and things seem to be working fine.