Page 1 of 2
multiple blogs
Posted: Sun Jun 29, 2008 2:38 am
by rob21
I have been looking for instructions to add multiple blogs to same database.
I believe it's done by changing dbprefix.
newbie
Posted: Mon Jun 30, 2008 5:55 pm
by judebert
That's exactly how it's done. You can't use the simple setup in that case, though; you have to use the expert setup, and specify a unique database prefix for each blog.
Posted: Tue Aug 05, 2008 5:27 pm
by rob21
I find documentation for using the httpd.conf but I don't have access to it with shared hosting.
Where can I find the instructions for doing it with the db prefix?
Posted: Tue Aug 05, 2008 7:41 pm
by garvinhicking
Hi!
rob21 wrote:I find documentation for using the httpd.conf but I don't have access to it with shared hosting.
Where can I find the instructions for doing it with the db prefix?
Simply install s9y and choose "Expert installation" in the s9y wizard.
No need to mangle with httpd.conf for that. This is only meant for shared installations, you don't need it if you simply want to install multiple versions of Serendipity into a single database. Each s9y installation will use its own unique tables by specifying the prefix.
Regards,
Garvin
Posted: Tue Aug 05, 2008 10:05 pm
by rob21
Thaanks
Any other options??
The program was installed from my web site host.
Posted: Tue Aug 05, 2008 10:13 pm
by judebert
Still shouldn't be a problem, although you may not be able to install with your webhost's script.
Just FTP the Serendipity files into a new directory. Look at your existing serendipity_config_local.inc.php to figure out where the database is and what the access credentials are. Now go visit the new directory, choose "Expert installation", and enter the access credentials, new database prefix, and any other options you like.
You can even install different versions of Serendipity into the same database.
And don't let the description "Expert" bother you. It's the same as Simple, but you get to see all the options that a Simple Installation forces to default values, like the database prefix. You don't need to change anything you don't understand.
Posted: Wed Aug 06, 2008 3:49 am
by rob21
Thanks for responding
I managed to create a new database and do an expert install of the program myself.
How do I create another blog with in the database using the db prefix??
Posted: Wed Aug 06, 2008 6:14 am
by Don Chambers
Rob21 - from the admin screen, when you first install s9y, you want to select "expert installation". The first group of installation options is marked "Database Settings". You will see options for Database type, Database host, Database user, Database password, Database name AND......... Database table prefix.... The type, host , user, password and name should match your existing database. What you what to change is the Database Table Prefix for this additional installation.
What that will do is maintain the single database, but create all the correct tables for this unique additional s9y installation.
For instance, lets say that your initial installation sets that prefix to "serendipity_". So that gives your database tables names like serendipity_entries, serendipity_whatever. Those tables are all still contained within a single database.
Now you want a second s9y install.... you want the TABLES to be contained within the same DATABASE. So you give this second database the prefix of "serendipity_second_." Now, all the tables unique to that second install have a name such as "serendipity_second_entries", and you can distinguish that 2nd install from the first due to that prefix.
Does that make sense?
Posted: Wed Aug 06, 2008 2:05 pm
by rob21
It sounds like I upload all the files again to a different directory and do a complete install using all the same settings except change db table prefix.
Am I correct??
Posted: Wed Aug 06, 2008 3:13 pm
by judebert
Yes, that is correct.
And of course, the path to the blog will have to match the new directory, too.
Posted: Thu Aug 07, 2008 2:52 am
by rob21
It sorta worked.
I used the same username and password for admin in both blogs but I'm locked out of the first blog.
I went into the database and there both the same.

Posted: Thu Aug 07, 2008 2:27 pm
by judebert
Could it be a cookie problem? If you set them up on the same domain, you'd need to delete the authentication cookie whenever you wanted to log in to another blog.
If you can figure out how to do subdomains on your server, and you set the Serendipity admin configuration to the new subdomain, that takes care of the cookie problem.
Posted: Fri Aug 08, 2008 2:42 am
by rob21
Thanks for responding
Each blog is in its own directory
Each blog has "serendipity_admin.php in its root
I can create a subdomain for each.
blog1.mydomain.com brings up serendipity_admin.php
blog2.mydomain.com brings up serendipity_admin.php
No matter what I do I can't log into the first blog.
This error appears in the database under access/browse for both blogs:
More than one INDEX key was created for column `artifact_id`
This going beyond my abilities.

Posted: Fri Aug 08, 2008 9:55 am
by garvinhicking
Hi!
So you can log into blog2, but not blog1? Which database prefix did you set for each blog? You should have two dataase tables like blog1_authors and blog2_authors. Check if both tables contain your login username?
Regards,
Garvin
Posted: Sun Aug 10, 2008 1:08 am
by rob21
prefixs:
serendipity_1
serendipity_2
Everything in the data base is
authors1
users1
authors2
users2
etc
Both tables have same username and password.