<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Oct 15, 2006, at 1:09 PM, Pico wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Ok.<SPAN class="Apple-converted-space"> </SPAN>But you didn't really make your case for naming until this post, and so you should understand that the prior exchange may have lacked some important context and substance.</FONT></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I said I walked in and didn't understand. I had read back several posts, but didn't understand the direction Ben S was going.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I didn't actually apologize for it: I'm sorry for the misunderstanding.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Having figured out a little about what he was talking about, I reframed my contribution to the discussion.</DIV><BR><BLOCKQUOTE type="cite"> <BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Ok, maybe that's not at all where you're going.<SPAN class="Apple-converted-space"> </SPAN>If you're not doing anything regarding user authentication, then maybe I'm wrong about this.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Why would you be wrong (or right) based on whether Ben S is thinking about user authentication.<SPAN class="Apple-converted-space"> </SPAN>If you are right, you are right.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">If Ben S is talking about something internal to the recipe, having nothing to do with authentication or global uses of databases/ADOdb, then I was wrong about my input. There's nothing wrong with being wrong :)</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><BLOCKQUOTE type="cite"> <BLOCKQUOTE type="cite"></BLOCKQUOTE></BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px"><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">For example, maybe your pagestore is on the same server, maybe even</FONT></BLOCKQUOTE></BLOCKQUOTE></P><BLOCKQUOTE type="cite"> <BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">the same database, as the authentication that would be accessed by AuthUserDBase.<SPAN class="Apple-converted-space"> </SPAN>Why would the admin repeat the info?</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Having a unique human-readable label for each database (and database connection!) would be helpful here.<SPAN class="Apple-converted-space"> </SPAN>PHP has this wonderful way of allowing you to call function and name names by way of variables.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">$Databases['moodle'] = array(connection info...); //<SPAN class="Apple-converted-space"> </SPAN>$Databases['moodle']['type'] is "mysql"</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">AuthUserDBase could have</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">$AUDuse = 'moodle';</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">then (if $$AUDuse isn't defined...):</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">$$AUDuse = new NewADOConnection($Databases[$AUDuse]['type']);</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Now there's a class instance for that connection named $moodle -- but we never need to know that.<SPAN class="Apple-converted-space"> </SPAN>Individual recipes can test whether another recipe already defined the connection with ADOdb, creating less class instances that are redundant.<SPAN class="Apple-converted-space"> </SPAN>$Databases['??'] is optionally human-readable by the admin, and can be whatever value the admin wants in whatever language, or can be a code, numbers, etc.<SPAN class="Apple-converted-space"> </SPAN>For the programmer it's just a matter of typing an extra $ and thinking a bit more expansively.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">This also helps protect the namespace.<SPAN class="Apple-converted-space"> </SPAN>How many people are going to define $db = new NewADOConnection('mysql');</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">straight out of the documentation -- causing potential namespace clashes between recipes....</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Are there other concerns?</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">I would think that the biggest potential problem to be addressed is whether distinctions should be drawn between access db for content and for security.<SPAN class="Apple-converted-space"> </SPAN>If you provide unified connection code that fails to distinguish between content used for publishing and content used for security, then won't there be a danger that security information will be inadvertently published?<SPAN class="Apple-converted-space"> </SPAN>The issue can arise with two separate dbs, and<SPAN class="Apple-converted-space"> </SPAN>can be complicated if the same db contains tables to store content and security data.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">This can be handled by the admin. $Databases can be used for multiple authentication levels to the same database as well....</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">$Databases['mysqlprivileged'] = array( ...for writing to the authentication database);</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">$Databases['mysqlreadonly'] = array( ... for reading from the database only);</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">$AUDuse = 'mysqlprivileged'; // if it's the stand-alone, needs to write to the database type of use</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">$AUDuse = 'mysqlreadonly'; // if it's the read-only type that is only authenticating AGAINST the database, but doesn't need to write to it....</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">So, in the end, the issue may not really be about providing names for connections so that they can be shared, but in providing a mechanism to distinguish db data intended for publication from data intended for security.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">That has to fall on the shoulders of the database admin, too. I could create separate unpriviledged users -- AND SHOULD -- to protect the database. Then I need a way to have multiple database/user combos in the wiki.</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><BLOCKQUOTE type="cite"> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">As with most of my posts in this area, please keep in mind the running disclosure that I don't know what I am talking about, but I see what I see (like the fool who says the sun is rising, I may just be right).</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">LOL -- hey, someone saying "sounds good" is better than crickets....</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><BLOCKQUOTE type="cite"> <BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">You said "each database already has a name" but I don't find $db to be particularly descriptive or safe.<SPAN class="Apple-converted-space"> </SPAN>That's not a "name" but a storage container used on the programming end, not the administrator end, of a recipe.<SPAN class="Apple-converted-space"> </SPAN>"there can only be one connection to a given database at a time" -- this is not true.<SPAN class="Apple-converted-space"> </SPAN>I can easily do $db1 and $db2 as two connections, perhaps each looking at a different table of the same database...</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">If I'm authenticating someone from tableA and you're storing pages in tableB of the same database, we could share the same connection/data -- or we can have multiple connections and duplicated authentication data.<SPAN class="Apple-converted-space"> </SPAN>Databases are all about multiple connections.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">When writing vbulletin.php I used adodb but the same authentication as the AuthUserDBase -- so I copied the variables -- what a waste.<SPAN class="Apple-converted-space"> </SPAN>I thought there should be a better way to share the same info.<SPAN class="Apple-converted-space"> </SPAN>Many hosting services only give you one database to connect to.<SPAN class="Apple-converted-space"> </SPAN>Why are admins required to duplicate their data because the cookbook authors can't agree on one method to share this data (and maybe even connection!) between their recipes?</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Whatever we do, we have to allow multiple databases and servers while making it easier on the administrator(s).</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Yes, please.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">We're all open to it, which is great. Problem is getting on the phone and having a real conference call about methodology ;)</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><BLOCKQUOTE type="cite"> <BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">----</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Another reason I'm writing is to verify whether you're working on database-based authentication.<SPAN class="Apple-converted-space"> </SPAN>I'm slated to work, alone or with Ben Wilson, on improving AuthUserDBase and incorporating ADOdb, etc.<SPAN class="Apple-converted-space"> </SPAN>If you're working on it, then I shouldn't.<SPAN class="Apple-converted-space"> </SPAN>We don't need more confusion, Ben & I discussed eliminating confusion by merging the AuthUserDBase and XesAuthUserDBase recipes.<SPAN class="Apple-converted-space"> </SPAN>So I wanted to check whether or not this is something that is part of your recipe.<SPAN class="Apple-converted-space"> </SPAN>I doubt it, but it's better that I ask.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Ben can answer that, I can't.<SPAN class="Apple-converted-space"> </SPAN>But my impression is that we (as a community) will be best served if recipe authors work together to provide solutions that can be layered to work together, and that there is no need to "re-invent the wheel."</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">Exactly.</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">I've extended many a recipe or core feature, but I'm all for rolling it back in when it's past "does it work" and "is it useful"</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><BLOCKQUOTE type="cite"> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Regards to Jack.</FONT></P> </BLOCKQUOTE></DIV><BR><DIV>Jack says hi ;)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Crisses</DIV></BODY></HTML>