| Author |
Message |
geneb19
Beginner


Joined: Sep 16, 2007 Posts: 7
|
Posted: Sat Jan 19, 2008 2:54 am Post subject: Receiving error when attempting to run Postgresql command |
|
|
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. )
TIA!!
Gene |
|
| Back to top |
|
|
AdBot
|
| Post subject: Receiving error when attempting to run Postgresql command |
|
|
|
|
|
| Back to top |
|
 |
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 955
|
Posted: Sat Jan 19, 2008 4:03 pm Post subject: Re: Receiving error when attempting to run Postgresql comman |
|
|
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  |
|
| Back to top |
|
|
geneb19
Beginner


Joined: Sep 16, 2007 Posts: 7
|
Posted: Sat Jan 19, 2008 4:30 pm Post subject: Re: Receiving error when attempting to run Postgresql comman |
|
|
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 |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 955
|
Posted: Sun Jan 20, 2008 3:19 pm Post subject: Re: Receiving error when attempting to run Postgresql comman |
|
|
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 |
|
|
geneb19
Beginner


Joined: Sep 16, 2007 Posts: 7
|
Posted: Sun Jan 20, 2008 5:06 pm Post subject: Re: Receiving error when attempting to run Postgresql comman |
|
|
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 |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 955
|
|
| Back to top |
|
|
geneb19
Beginner


Joined: Sep 16, 2007 Posts: 7
|
Posted: Sun Jan 20, 2008 10:19 pm Post subject: Re: Receiving error when attempting to run Postgresql comman |
|
|
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. 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 |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 955
|
Posted: Mon Jan 21, 2008 1:10 am Post subject: Re: Receiving error when attempting to run Postgresql comman |
|
|
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 |
|
|
geneb19
Beginner


Joined: Sep 16, 2007 Posts: 7
|
Posted: Wed Jan 23, 2008 3:21 pm Post subject: Re: Receiving error when attempting to run Postgresql comman |
|
|
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 |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 955
|
Posted: Thu Jan 24, 2008 6:00 pm Post subject: Re: Receiving error when attempting to run Postgresql comman |
|
|
| 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 |
|
|
|
|
|
|
|