From: Geoff S. <Ge...@Ho...> - 2001-03-23 20:17:07
|
I would like to suggest that phpWebSite should have the ability to create multiple phpWebsite databases in a single mySQL database. Here's why: many if not most web hosts limit the number of databases allowed on a single website. So, if one wanted to create multiple, functionally separate instances of phpWebsite on a single domain, it must be done within a single database. Here's my suggestion: Add a configurable prefix onto each table name controlled by a variable in the configuration file. For example, Add a variable such as, "$dbp" to the configuration file. Then when someone sets $dbp = "sales", then the author table, for example, would have the name sales_author. Then, what I can do is install the phpWebsite code into a domain subdirectory called sales, set $dbp to "sales" and have a separate set of tables for the "sales" website. I can then setup another subdirectory called "techsupport", install the phpwebsite code into that directory, and configure it with the $dbp variable set to "tech" and have a separate set of tables for this instance of phpWebSite. I would design this so that is someone set $dbp = "" (empty), then there would be no effect on the existing table names. This would preserve code compatibility with existing sites. There are other ways of doing this so that multiple websites can exist in the same set of tables, but that would take a lot of design and implementation work. The above approach can be quickly and easily implemented. Geoff Geoff Staples, Founder Action Agenda <http://www.actionagenda.com/> 3883 Turtle Creek Blvd., Suite 1812 Dallas, Texas 75219-4432 214.599.0260 Action Agenda is hosted as a public service by Hostricity Web Hosting <http://www.hostricity.com/> ActionAgenda.com is a Community Center for progressive and liberal activists to stay informed, find allies, and build support. |
From: Jason C. <cam...@xp...> - 2001-03-23 20:22:57
|
I like this idea. Unless anyone objects to this being added I could start work on this sometime this weekend. Anyone else have any thoughts on this? Jason Campbell Xplozive Media Technologies www.xplozivemedia.com phpWebSite Developer > I would like to suggest that phpWebSite should have the ability to > create multiple phpWebsite databases in a single mySQL database. Here's > why: many if not most web hosts limit the number of databases allowed > on a single website. > > So, if one wanted to create multiple, functionally separate instances > of phpWebsite on a single domain, it must be done within a single > database. > > Here's my suggestion: > > Add a configurable prefix onto each table name controlled by a variable > in the configuration file. > > For example, Add a variable such as, "$dbp" to the configuration file. > Then when someone sets $dbp = "sales", then the author table, for > example, would have the name sales_author. > > Then, what I can do is install the phpWebsite code into a domain >subdirectory called sales, set $dbp to "sales" and have a separate set >of tables for the "sales" website. I can then setup another subdirectory >called "techsupport", install the phpwebsite code into that directory, >and configure it with the $dbp variable set to "tech" and have a >separate set of tables for this instance of phpWebSite. > > I would design this so that is someone set $dbp = "" (empty), then > there would be no effect on the existing table names. This would > preserve code compatibility with existing sites. > > There are other ways of doing this so that multiple websites can exist > in the same set of tables, but that would take a lot of design and > implementation work. The above approach can be quickly and easily > implemented. > > Geoff > > Geoff Staples, > Founder > Action Agenda <http://www.actionagenda.com/> > > 3883 Turtle Creek Blvd., Suite 1812 > Dallas, Texas 75219-4432 > 214.599.0260 > > Action Agenda is hosted as a public service by > Hostricity Web Hosting <http://www.hostricity.com/> > > ActionAgenda.com is a Community Center for progressive and liberal > activists to stay informed, find allies, and build support. > > > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |
From: Aaron A. <aa...@wc...> - 2001-03-23 20:26:13
|
Would this method allow a site to have multiple instances of phpWS, but share one user table? --- Aaron Adams From: "Jason Campbell" <cam...@xp...> Reply-To: php...@li... Date: Fri, 23 Mar 2001 15:31:07 -0500 (EST) To: php...@li... Subject: Re: [Phpwebsite-developers] Table Naming Conventions and Multiple Instances of phpWebSite I like this idea. Unless anyone objects to this being added I could start work on this sometime this weekend. Anyone else have any thoughts on this? Jason Campbell Xplozive Media Technologies www.xplozivemedia.com phpWebSite Developer > I would like to suggest that phpWebSite should have the ability to > create multiple phpWebsite databases in a single mySQL database. Here's > why: many if not most web hosts limit the number of databases allowed > on a single website. > > So, if one wanted to create multiple, functionally separate instances > of phpWebsite on a single domain, it must be done within a single > database. > > Here's my suggestion: > > Add a configurable prefix onto each table name controlled by a variable > in the configuration file. > > For example, Add a variable such as, "$dbp" to the configuration file. > Then when someone sets $dbp = "sales", then the author table, for > example, would have the name sales_author. > > Then, what I can do is install the phpWebsite code into a domain >subdirectory called sales, set $dbp to "sales" and have a separate set >of tables for the "sales" website. I can then setup another subdirectory >called "techsupport", install the phpwebsite code into that directory, >and configure it with the $dbp variable set to "tech" and have a >separate set of tables for this instance of phpWebSite. > > I would design this so that is someone set $dbp = "" (empty), then > there would be no effect on the existing table names. This would > preserve code compatibility with existing sites. > > There are other ways of doing this so that multiple websites can exist > in the same set of tables, but that would take a lot of design and > implementation work. The above approach can be quickly and easily > implemented. > > Geoff > > Geoff Staples, > Founder > Action Agenda <http://www.actionagenda.com/> > > 3883 Turtle Creek Blvd., Suite 1812 > Dallas, Texas 75219-4432 > 214.599.0260 > > Action Agenda is hosted as a public service by > Hostricity Web Hosting <http://www.hostricity.com/> > > ActionAgenda.com is a Community Center for progressive and liberal > activists to stay informed, find allies, and build support. > > > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers _______________________________________________ Phpwebsite-developers mailing list Php...@li... http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |
From: Jason C. <cam...@xp...> - 2001-03-23 20:31:50
|
If you want to do that, I just thought of a way to do it. It would just require a variable in the config.php file to use a single user table say like $share_user_table or something like that. Thats with the database feature below added into the code already. > Would this method allow a site to have multiple instances of phpWS, but > share one user table? > --- > Aaron Adams > > > > From: "Jason Campbell" <cam...@xp...> > Reply-To: php...@li... > Date: Fri, 23 Mar 2001 15:31:07 -0500 (EST) > To: php...@li... > Subject: Re: [Phpwebsite-developers] Table Naming Conventions and > Multiple Instances of phpWebSite > > > I like this idea. Unless anyone objects to this being added I could > start work on this sometime this weekend. Anyone else have any > thoughts on this? > > Jason Campbell > Xplozive Media Technologies > www.xplozivemedia.com > phpWebSite Developer > >> I would like to suggest that phpWebSite should have the ability to >> create multiple phpWebsite databases in a single mySQL database. >> Here's why: many if not most web hosts limit the number of databases >> allowed on a single website. >> >> So, if one wanted to create multiple, functionally separate instances >> of phpWebsite on a single domain, it must be done within a single >> database. >> >> Here's my suggestion: >> >> Add a configurable prefix onto each table name controlled by a >> variable in the configuration file. >> >> For example, Add a variable such as, "$dbp" to the configuration file. >> Then when someone sets $dbp = "sales", then the author table, for >> example, would have the name sales_author. >> >> Then, what I can do is install the phpWebsite code into a domain >>subdirectory called sales, set $dbp to "sales" and have a separate set >>of tables for the "sales" website. I can then setup another >>subdirectory called "techsupport", install the phpwebsite code into >>that directory, and configure it with the $dbp variable set to "tech" >>and have a >>separate set of tables for this instance of phpWebSite. >> >> I would design this so that is someone set $dbp = "" (empty), then >> there would be no effect on the existing table names. This would >> preserve code compatibility with existing sites. >> >> There are other ways of doing this so that multiple websites can exist >> in the same set of tables, but that would take a lot of design and >> implementation work. The above approach can be quickly and easily >> implemented. >> >> Geoff >> >> Geoff Staples, >> Founder >> Action Agenda <http://www.actionagenda.com/> >> >> 3883 Turtle Creek Blvd., Suite 1812 >> Dallas, Texas 75219-4432 >> 214.599.0260 >> >> Action Agenda is hosted as a public service by >> Hostricity Web Hosting <http://www.hostricity.com/> >> >> ActionAgenda.com is a Community Center for progressive and liberal >> activists to stay informed, find allies, and build support. >> >> >> _______________________________________________ >> Phpwebsite-developers mailing list >> Php...@li... >> http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |
From: Yves P. <yv...@se...> - 2001-03-23 20:34:46
|
I'm working on a billingual site. I like this idea a lot. Yves Poirier http://www.mileend.org > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of > Jason Campbell > Sent: March 23, 2001 3:31 PM > To: php...@li... > Subject: Re: [Phpwebsite-developers] Table Naming Conventions and > Multiple Instances of phpWebSite > > |
From: Todd O. <to...@da...> - 2001-03-23 21:05:08
|
I agree multiple phpWebSites should run in one database, but I _disagree_ with the proposed fix. I am with Aaron and Jason; the sites need to share common tables. The following is an excerpt from a March 6th post to the list. __Multiple Organizations If we want to make phpWebSite scale to have multiple organizations in the same database, then we need to add an additional field to each table such as "ouid" (organizational unit id) ["oid" is reserved for object id in Postgres]. The primary key for each table would need to be changed to (cid, ouid) instead of (cid) alone. To prevent ouid guessing or spoofing, the user access control list (ACL) would have to be consulted for each page access, which should be done anyway. Since this change affects just about every call to the database tables, it seems to be a good time to add the database abstraction layer while we're at it. Will it be PEAR of ADODB? --Todd |
From: Jason C. <cam...@xp...> - 2001-03-23 21:14:06
|
I remember that post about it too now that your brought it up. Its a very good idea to get phpwebsite to be scalable but its bigger than changing one thing in the config, it would be better to do what Todd quoted from the other message about this option. I'd be willing to work on it with whoever would want to do this on the dev team. I remember someone saying a new version of ADODB was released, before we use one or the other I think we'd have to know how stable each are and which one is more widely used by other developers. Did this get discussed anymore on which one to use, PEAR of ADODB??? Jason Campbell Xplozive Media Technologies phpWebSite Developer > I agree multiple phpWebSites should run in one database, but I > _disagree_ with the proposed fix. > > I am with Aaron and Jason; the sites need to share common tables. The > following is an excerpt from a March 6th post to the list. > > __Multiple Organizations > If we want to make phpWebSite scale to have multiple organizations in > the same database, then we need to add an additional field to each > table such as "ouid" (organizational unit id) ["oid" is reserved for > object id in Postgres]. The primary key for each table would need to > be changed to (cid, ouid) instead of (cid) alone. To prevent ouid > guessing or spoofing, the user access control list (ACL) would have to > be consulted for each page access, which should be done anyway. > > Since this change affects just about every call to the database tables, > it seems to be a good time to add the database abstraction layer while > we're at it. Will it be PEAR of ADODB? > > --Todd > > > > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |
From: Geoff S. <ge...@ho...> - 2001-03-24 05:04:16
|
I agree that having an organizational unit id would be a great idea. HOWEVER, that will not happen soon. I'd like to have the separate table enhancement, because it is dirt easy to implement. I'll take this one step further: I have a requirement that necessitates the separate table in the same database solution. So, if the group doesn't agree to it, I'm going to have to do it on my own and I'm REALLY going to hate being in the position of having to maintain my own separate code base before I've even set up my first phpWebsite. (I expect to have about 10 websites running phpWebsite off separate tables within a single database by April 15th.) Also, there is a security issue. If you setup separate tables for each sub website, then you can grant access privileges separately to each sub-web. (I don't think that mySQL implements row level security. Someone please correct me if I am wrong about this!) If you store everything in the same set of tables, you cannot use the mySQL security system because you can't assign specific values in a column to a mySQL userid. That means you must rely on the security in phpWebsite to control access if you segment by using an organization id (OID) in the tables. (Not that there's anything wrong with that.) Now, I think that BOTH of these techniques have their place and are appropriate for different circumstances. The separate table technique allows separate database administrators to have access to their data and no one else's via the database security system. They could dump their data using a database utility, or whatever. The OID technique provides user security, and admin security within the context of phpWebSite. But, anyone who has access to the database userid and password would have access to all of the data, not just their own. So, BOTH of these techniques have their place in the design. The separate table technique and the OID column technique can coexist without having any impact on each other and will allow much more flexibility. Now, here's another issue. I would like to be able to assign phpWebSite administrators to various topics or pages within a website. This would allow someone to setup a website and have an administrator for the "Linux" topic and a separate administrator for the "Mandrake" topic. This would have to be done programmatically through the phpWebsite administrative programs. IMHO, all three of the above need to be part of the system. Geoff Hostricity.com Dallas, Texas -----Original Message----- From: php...@li... [mailto:php...@li...]On Behalf Of Jason Campbell Sent: Friday, March 23, 2001 3:22 PM To: php...@li... Subject: Re: [Phpwebsite-developers] Table Naming Conventions and Multiple Instances of phpWebSite I remember that post about it too now that your brought it up. Its a very good idea to get phpwebsite to be scalable but its bigger than changing one thing in the config, it would be better to do what Todd quoted from the other message about this option. I'd be willing to work on it with whoever would want to do this on the dev team. I remember someone saying a new version of ADODB was released, before we use one or the other I think we'd have to know how stable each are and which one is more widely used by other developers. Did this get discussed anymore on which one to use, PEAR of ADODB??? Jason Campbell Xplozive Media Technologies phpWebSite Developer > I agree multiple phpWebSites should run in one database, but I > _disagree_ with the proposed fix. > > I am with Aaron and Jason; the sites need to share common tables. The > following is an excerpt from a March 6th post to the list. > > __Multiple Organizations > If we want to make phpWebSite scale to have multiple organizations in > the same database, then we need to add an additional field to each > table such as "ouid" (organizational unit id) ["oid" is reserved for > object id in Postgres]. The primary key for each table would need to > be changed to (cid, ouid) instead of (cid) alone. To prevent ouid > guessing or spoofing, the user access control list (ACL) would have to > be consulted for each page access, which should be done anyway. > > Since this change affects just about every call to the database tables, > it seems to be a good time to add the database abstraction layer while > we're at it. Will it be PEAR of ADODB? > > --Todd > > > > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers _______________________________________________ Phpwebsite-developers mailing list Php...@li... http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |
From: Todd O. <to...@da...> - 2001-03-24 14:47:09
|
Geoff, > That means you must rely on the security in phpWebsite to control access > if you segment by using an organization id (OID) in the tables. (Not that > there's anything wrong with that.) My philosophy is consistant with the statement above. You are correct that separate tables are the only way to use MySQL database security (row level security would be a bear anyway). Your observation that each "site" admin could dump (and restore) their own tables is a good point. My "combined" table scheme would have "super" administrators, like root, that could create, delete and modify site administrators, back-up data and so forth. More on this later. > I agree that having an organizational unit id would be a great idea. > HOWEVER, that will not happen soon. I'd like to have the separate > table enhancement, because it is dirt easy to implement. The ouid scheme will happen soon, but not by April 15th (I'll grant you that). > Now, I think that BOTH of these techniques have their place and are > appropriate for different circumstances. Agreed. We don't want a fork if both methods can coexist. Can you lay out more coding details for us to help you implement this? --Todd Owen |
From: Geoff S. <Ge...@Ho...> - 2001-03-24 17:33:08
|
Todd: I have a suggestion for you. I've been invited to be a developer, but have not yet received my CVS access. Jeremy asked me what userid and password I want, but, I haven't heard back from him. I'll go in, look at the code, and make a suggestion. I think it is a simple search and replace -- remember that the SQL queries are all strings so concatenating a prefix variable onto the table names should be more mechanical find and replace then anything else. I'll look at the code and provide a specification within the next 3 or 4 hours. Once approved, I'd be happy to do the actual work. The only problem here is that I have to put up a site on Monday or Tuesday at the latest and I don't have CVS access yet. So, Jeremy, if you are out there reading this... One item: I really like what you have proposed for the administration system. Even more then the OID aspect, I'm especially excited about the prospect of having the following: Giving some users that authority to post, delete, and modify their own submissions. Having multiple admins who can manage one or more topics, pages, etc. I think that this will require having a user and admin "group" scheme in order to make it work. NOW: Here's a BIG concern that I mentioned previously and gotten no response: I've looked at the database and there is no real database design. And, of course, we all know that the code is sort of all grafted together. SO, I'm hoping that we can take the time to do some serious modeling of the system and come up with an architecture and a new data and function model. (I'd call it "object-oriented," but, I don't want to confuse the issue with coding technique.) My suggestion would be this: Do some analysis Do the design Build a new database Build a new system framework consisting of source code files, classes (if they are used), and function prototypes (Functions that have the function name, the calling and return variables and values defined, but have no procedural code in them). Then, steal procedural code from the existing system to go into the new functions and classes. Write new code as needed. My concern is that if we proceed "inside out" by trying to upgrade the existing system in place, we will never achieve the goal of a system that is powerful, extensible, and maintainable. Geoff Geoff, > That means you must rely on the security in phpWebsite to control access > if you segment by using an organization id (OID) in the tables. (Not that > there's anything wrong with that.) My philosophy is consistant with the statement above. You are correct that separate tables are the only way to use MySQL database security (row level security would be a bear anyway). Your observation that each "site" admin could dump (and restore) their own tables is a good point. My "combined" table scheme would have "super" administrators, like root, that could create, delete and modify site administrators, back-up data and so forth. More on this later. > I agree that having an organizational unit id would be a great idea. > HOWEVER, that will not happen soon. I'd like to have the separate > table enhancement, because it is dirt easy to implement. The ouid scheme will happen soon, but not by April 15th (I'll grant you that). > Now, I think that BOTH of these techniques have their place and are > appropriate for different circumstances. Agreed. We don't want a fork if both methods can coexist. Can you lay out more coding details for us to help you implement this? --Todd Owen _______________________________________________ Phpwebsite-developers mailing list Php...@li... http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |