Page 1 of 1

Serendipity Databases for multi-users

Posted: Thu Nov 09, 2006 12:05 am
by jimmyboy
One question, you mentioned when sharing an installation of Serendipity, the setup of DBs.

How is it, each user requires a unique DB? Is it not possible to have a single DB, with a variety of tables, so each user's content is unique because of their ID!

Pre-requisite of each individual DB multi-plicitly complicates administration, and basically kills any dynamic admin plausibility.

If you required users to dynamically create their blogs, the DB would have to exist. As for dynamic creation of the USER credentials during Serendipity installation, the documentation gives no indication of what parameters we can make use of for this purpose.

It leaves the site administrator with a lot of egg on their face.

Can true dynamicism be achieved with Serendipity, because there are a few system call to be made, like "mkdir" for new user; execute SQL to create new user DB; set permissions for new user; and link / cp the relevant shared files;

Serendipity documentation does not help much along these lines. But if you can point me in the right direction, I could maybe write PHP utilities and incorporate them into the Serendipity setup, and hey-presto.

Can you comment on this please.

Re: Serendipity Databases for multi-users

Posted: Thu Nov 09, 2006 10:04 am
by garvinhicking
Hi Jimmiboy!

Finall you made it here. *gg*
How is it, each user requires a
unique DB? Is it not possible to have a single DB, with a variety of tables, so each user's content is unique because of their ID!
Actually the shared installation does not really require unique DBs, it just requires unique Prefixes. If you put each s9y installation into a seperate Database, that'S fine - but it'S also fine if you put all in the same DB, and prefix every s9y installation differently (like s9y1_, s9y2_ and so on).
Pre-requisite of each individual DB multi-plicitly complicates administration, and basically kills any dynamic admin plausibility.
Not if the shared installation script you create keeps track of Prefixes/DB names, so that you can run administrative actions on every of those. Jannis did that for supersized.org - he can execute a SQL query that is iterated on every DB/prefix.
If you required users to dynamically create their blogs, the DB would have to exist. As for dynamic creation of the USER credentials during Serendipity installation, the documentation gives no indication of what parameters we can make use of for this purpose.
Do you mean which SQL privileges a s9y user needs?

It requires at least those: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX
Can true dynamicism be achieved with Serendipity, because there are a few system call to be made, like "mkdir" for new user; execute SQL to create new user DB; set permissions for new user; and link / cp the relevant shared files;
We strongly believe in specific server setups where it is hard to make Serendipity build "shared installation sites" globally, thus we do not supply any global scripts to do that, and just point people into creating their own setup scripts. Usually that's only 10 lines of code or so, and those are usually very specific to your server. We admit that shared installation is only for users who know some PHP and Apache.

Having said this, we had a user that has tried to create some PERL and BASH scripts to aid in the process:

http://php-blog.cvs.sourceforge.net/php ... ins/setup/

You can create a simple PHP script that simply sets the required Serendipity variables, and then make your script include the 'include/admin/installer.inc.php' s9y file, which will then take care of the installation procedure just as if a user installed s9y on his own. Of course you can use a wrapper script that makes the output of this s9y file invisible to the user signing up on your page.

But, to answer your question: Yes, true dynamic creation of shared s9y blogs can be achieved. supersized.org and other services do it fully automatted.
Serendipity documentation does not help much along these lines. But if you can point me in the right direction, I could maybe write PHP utilities and incorporate them into the Serendipity setup, and hey-presto.
If you see a way to make such a script work on common systems (mod_php, PHP CGI, with/without VirtualHosts etc.), we would be very glad for any contribution! I fully agree that help in this area is still needed. :-)

Best regards,
Garvin

supersized.org

Posted: Fri Nov 10, 2006 7:25 pm
by Arnold Nijboer
ey garvin, you say that supersized.org is fully autonome isn't it an idee to put those files online, or just line uit the basics how that system runs. to use it like an manual/template for development or something.

greating
Arnold Nijboer

Posted: Fri Nov 10, 2006 9:21 pm
by judebert
supersized.org is one of Jannis's projects. He'd have to be the one to decide whether or not to publish the scripts. And considering the amount of effort he's put into them and building that community, I wouldn't blame him if he refused.

Posted: Sat Nov 11, 2006 5:08 pm
by Arnold Nijboer
And considering the amount of effort he's put into them and building that community, I wouldn't blame him if he refused.
you're absolutly right, BUT.... it's an open source blogger right? and considering the ammount of users who are asking for it! I senserly hope he will put it online?!

Greatings
Arnold nijboer

Posted: Sat Nov 11, 2006 5:17 pm
by garvinhicking
Hi Arnold!

Open source is only Serendipity, supersized (what jannis created) is his own thing.

Just ask him, right? :-)

Best regards,
Garvin

Posted: Tue Nov 14, 2006 2:18 pm
by clander
Hi Garvin,
garvinhicking wrote:Hi Arnold!

Open source is only Serendipity, supersized (what jannis created) is his own thing.
I've been bashing the keys recently at work (it's this mind numbing job shunting trailers into IBC Luton [Vauxhall Vivaro, Renault Traffic, etc.] as I'm a truck driver), and over the last six weeks I have almost completed a new version of S9Y_Conf in PHP!

You can see a preview at <www.labbs.com/~clander/s9y_conf/php/>.

This is still a work in progress as I have some additional tasks before I'll be happy to make a release, but any feedback from the 'Gurus of Serendipity' may be helpful.

Any clues Jannis? :)

Best regards