Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Receiving error when attempting to run Postgresql command

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » phpBB Integration » phpBB3 / Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Author Message
geneb19

Beginner
Beginner


Joined: Sep 16, 2007
Posts: 7

PostPosted: Sat Jan 19, 2008 2:54 am    Post subject: Receiving error when attempting to run Postgresql command Reply with quote

When I attempt to add the following line into the database:

INSERT INTO phpbb_acl_options ( auth_option_id , auth_option , is_global , is_local , founder_only ) VALUES (NULL , a_gallery2, 1, 0, 0);

I receive this error:

ERROR: Attribute "a_gallery2" not found

I've removed the single quotes in the above command since Postgresql doesn't use that type of notation. Any ideas of what's going on or how to correct it?

Also are there any plans to write the integration for sites using Postgresql rather than mysql? I sure hope so since I'm sure there are a lot of others out there running into the problems with the single quotes and the fact that Postgresql doesn't recognize TINYINT (#) but rather uses SMALLINT with no number after. (Sorry for mixing two issues in one post. Embarassed )

TIA!!

Gene
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject: Receiving error when attempting to run Postgresql command  

Back to top
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 1139

PostPosted: Sat Jan 19, 2008 4:03 pm    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

I guess I need to install postgre and test it. I've only tested on mysql. I will look at the way phpbb sets up postgre if you are willing to help test it.

I think your problem is that "a_gallery2" needs to be inserted as a string value. mysql does that with quotes, don't know what postgre uses Embarassed
Back to top
Offline View user's profile Send private message
geneb19

Beginner
Beginner


Joined: Sep 16, 2007
Posts: 7

PostPosted: Sat Jan 19, 2008 4:30 pm    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

I'm absolutely willing to test it man! Fantastic. You're the best! I expected a reply to the effect that you'd look into it and let me know something "in the future". I should have realized that you'd take immediate action. lol You do great work and it shows!

I'll try inserting "a_gallery2" as a string value and let you know how that works as well. Hadn't even dawned on me to try that. (I'm certainly not a Postgresql guru by any stretch of the imagination. lol)

G
Back to top
Offline View user's profile Send private message Visit poster's website
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 1139

PostPosted: Sun Jan 20, 2008 3:19 pm    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

Does it work like this?
Code: › #
#-----[ SQL ]------------------------------------------
# (Use correct table prefix if not phpbb)
#
CREATE TABLE phpbb_gallery2 (
fullPath VARCHAR( 255 ) NOT NULL,
embedUri VARCHAR( 255 ) NOT NULL,
g2Uri VARCHAR( 255 ) NOT NULL,
activeAdminId INT NOT NULL,
exportData TEXT NULL,
link TINYINT( 1 ) NOT NULL,
allLinks TINYINT( 1 ) NOT NULL,
allLinksAlbums TINYINT( 1 ) NOT NULL,
allLinksLimit VARCHAR( 10 ) NOT NULL
);

INSERT INTO phpbb_acl_options ( auth_option_id , auth_option , is_global , is_local , founder_only ) VALUES (NULL , 'a_gallery2', 1, 0, 0);

ALTER TABLE phpbb_users ADD user_gallery VARCHAR(10) NULL DEFAULT NULL;
Back to top
Offline View user's profile Send private message
geneb19

Beginner
Beginner


Joined: Sep 16, 2007
Posts: 7

PostPosted: Sun Jan 20, 2008 5:06 pm    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

Alright, the first portion...CREATE TABLE phpbb_gallery2...works beautifully.

However I'm still not getting it to accept the 'a_gallery2' in single quotes. The single quotes in Postgresql indicate a literal text string (along with the keyword TEXT). If I'm not totally mistaken "a_gallery2" needs to be "translated" into the string as you pointed out but I'm assuming it is a variable with changing information in it. And I have no idea how Postgresql calls that type of thing. Just throwing out ideas here but would the information "a_gallery2" contains have to go into a temporary array and then be called when needed?

The ALTER TABLE command works beautifully too so there's no issues with it at all.

Gene
Back to top
Offline View user's profile Send private message Visit poster's website
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 1139

PostPosted: Sun Jan 20, 2008 8:10 pm    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

I guess I'm not following why that doesn't work...
http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS [postgresql.org]

'a_gallery2' is a literal string, it just needs to go in the db as is. Are you saying it needs the word text in front of it?
Back to top
Offline View user's profile Send private message
geneb19

Beginner
Beginner


Joined: Sep 16, 2007
Posts: 7

PostPosted: Sun Jan 20, 2008 10:19 pm    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

Ok, if that's the case then, I had it working yesterday morning. lol I inserted a_gallery2 as a literal string into the db and it accepted it fine. I'm still getting errors though and mistakenly assumed it was due to the above.

So...I entered everything in the database and it was accepted. I made all of the mods and saved them. When I go into the ACP to configure the Gallery2 portion of it I receive the following errors:

1) Under Configuration Settings when I enter the information required and click on Submit the next page shows me:
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 2878: Missing argument 3 for msg_handler()
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 2878: Missing argument 4 for msg_handler()


2) Under Link Settings I then receive these errors when clicking on the Link Settings button:
Gallery Integration Error
File: /var/www/gal2-dev.photo-genesis.net/phpBB3/includes/acp/acp_gallery2.php
Line: 298
Could not obtain config settings from phpbb_gallery2.


I haven't tried to use the remaining 3 buttons in this section since nothing was accomplished using the first two.

I'm quite sure it's something I'm doing wrong but have no idea what the "wrong" is. Confused I apologize if this has already been resolved in another thread...I looked but couldn't find it.

Gene

***EDIT*** Oh, and yes, it did take the following to make it work: TEXT ('a_gallery2') to make it acceptable to Postgresql, btw.
Back to top
Offline View user's profile Send private message Visit poster's website
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 1139

PostPosted: Mon Jan 21, 2008 1:10 am    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

Thanks for the input on the sql for postgresql.

The error you reference has been addressed in the next release. What are your config settings? Something is not right there...
Back to top
Offline View user's profile Send private message
geneb19

Beginner
Beginner


Joined: Sep 16, 2007
Posts: 7

PostPosted: Wed Jan 23, 2008 3:21 pm    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

sorry for taking so long to reply. ok...i was having other difficulties unrelated to the integration...so i blew away everything and reinstalled from scratch. everything seems to be working fine at this point with a couple of exceptions. (Can't read any of the messages but I seem to remember a thread here or elsewhere dealing with that.)

So...the only thing i needed to do...besides follow directions a lot more carefully than i did the first time around...was to remove the single quotes from the mysql commands to make them compatible with postgre. And to add TEXT ('a_gallery2') to the mix.

thanks a ton for your help dude...greatly appreciate it! and if you want me to test out future postgre implementations...just let me know...i'd love to help out any way i can.

Gene
Back to top
Offline View user's profile Send private message Visit poster's website
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 1139

PostPosted: Thu Jan 24, 2008 6:00 pm    Post subject: Re: Receiving error when attempting to run Postgresql comman Reply with quote

I went ahead and removed the single quotes from the mod sql because they work in mysql that way also. phpmyadmin formats sql queries that way and when I originally wrote the mods I copied and pasted from phpmyadmin. The only remaining issue, I think, is the TEXT() one. I still don't see how they handle that in phpbb, but at least it's just one issue now...
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » phpBB Integration » phpBB3 / Gallery 2 Integration View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSEO Search Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaCheap Web Design

6th year online! 2003-2009
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia