Two installations on same dbase

Having trouble installing serendipity?
Post Reply
Dalif
Regular
Posts: 40
Joined: Mon Aug 21, 2006 9:33 am
Location: Under your bed
Contact:

Two installations on same dbase

Post by Dalif »

Heya

I've been a happy s9y user for 3+ years. The other day I got into my head, that I needed a new blog for messing around with and testing. So I installed another copy of s9y. Now, besides the fact, that it seems the new installation wants 4 directories (including the mail blog-residence directory) to have permissions 777, while the other (the old) installation is content with 775, I have problems with the login/password on the new installation.

I've gone through the expert installation 3 times, and the last time I was very careful in typing out the username and password. But it still just gives me "You appear to have entered an invalid username or password" everytime I login.

So my question is, does s9y have problems running several installations using the same database, provided the prefix differs? And will this somehow have impact on the cms username process.

I seem to remember having had problems with this username stuff before, and also finding a solution on these boards. But I can't seem to find it again, so I just decided to ask again.

Thanks in advance
..|., 4tw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Two installations on same dbase

Post by garvinhicking »

Hi!

Which s9y version did you install exactly?

Did you install s9y into a subdirectory of an existing s9y directory?

Did you use special characters other than A-Z and 0-9 in your password or username?
So my question is, does s9y have problems running several installations using the same database, provided the prefix differs? And will this somehow have impact on the cms username process.
No, different DB prefixes are no problem at all. Nesting s9y installations into each other is, though. This is due to cookies being submitted to the subdir of s9y with the contents of the one in the s9y basedir.

The special characters can impose a problem when s9y is installed with a ISO/native charset, but stores the password as UTF-8, if you choose that as a differing language...

Also, remember that if you install s9y multiple times and you DO NOT remove the tables the installer created, s9y will NOT create new tables, but use the existing ones! So if you typed the password wrong in first instance, it will not overwrite the existing installation, I think.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dalif
Regular
Posts: 40
Joined: Mon Aug 21, 2006 9:33 am
Location: Under your bed
Contact:

Re: Two installations on same dbase

Post by Dalif »

Heya Garvin.

I installed 1.4.1 (the newest), and it wasn't installed into a subdir of the other s9y install, but a completely different directory structure. The only thing the two installations share is the MySQL database. As I said, they do have different prefixes.

I don't use special characters in either username or password. Just a mix between 0-9 and a-z. Nothing fancy.

If I remove the tables from the database with the username and password, would there be a way to recreate them without reinstalling s9y? Not that reinstalling is a problem, but I think I'll face the same problem again. I can edit the username and password directly in the SQL dbase, can I not?
..|., 4tw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Two installations on same dbase

Post by garvinhicking »

Hi!

This sounds odd. You could investigate the serendipity_authors DB table (or whatever prefix you used) and see what password is in there. For safetey, you could put the MD5() value of your password in there.

Which browser are you using? Are you using a proxy that could be interfering?

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dalif
Regular
Posts: 40
Joined: Mon Aug 21, 2006 9:33 am
Location: Under your bed
Contact:

Re: Two installations on same dbase

Post by Dalif »

Using FF 3.0.6, with no proxy. Just plain old connection through ISP. It's pretty standard install. I seem to remember having had this problem before. Don't remember how I solved it, of course. But I think a look through the database will give me some information.

I'm not the serveradmin myself, though, so I'll have to wait for him to be available later on today. I just wanted to know if you had any ideas of what to do, or experience with similar matters before. Also wanted to know if running more s9y installations from the same dbase was a problem. Since it isn't, I'll know that much at least.
..|., 4tw
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Two installations on same dbase

Post by judebert »

In fact, I'm running three s9y installations in the same database right now.

There was a problem with FF3 that would auto-fill password fields with incorrect information. Perhaps you've been bitten by that: the wrong password might have been inserted in the user table, and never replaced because removing and reinstalling s9y doesn't remove its tables.
Judebert
---
Website | Wishlist | PayPal
Dalif
Regular
Posts: 40
Joined: Mon Aug 21, 2006 9:33 am
Location: Under your bed
Contact:

Re: Two installations on same dbase

Post by Dalif »

Yeah that could be. But I doubt it. Not because of the FF thing anyway, since I filled it out myself. But I could've mistyped it.

What would be the best way of going about correcting this? Flushing the dbase, and reinstalling s9y? I'd think that would do it anyway.
..|., 4tw
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Two installations on same dbase

Post by judebert »

While I kinda like the idea of manually inserting an MD5 hash in the password table, I think the easier solution is exactly what you said. Drop the tables for only that installation and reinstall.
Judebert
---
Website | Wishlist | PayPal
Dalif
Regular
Posts: 40
Joined: Mon Aug 21, 2006 9:33 am
Location: Under your bed
Contact:

Re: Two installations on same dbase

Post by Dalif »

Ok. I had a gander at the dbase tables today, and the authors table for this new install was empty. So I take it, no pass and username was ever written to it. I checked, to verify, the same table for my other working install, and that looked fine.

Now, I'm not used to mysql, and I don't, nor have the option to, use phpmyadmin, so I'd have to figure out how to do this manually in the mysql prompt.

Most importantly, I have to figure out why s9y doesn't write to the tables, and why it doesn't give me an error when it can't.

Any thoughts?
..|., 4tw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Two installations on same dbase

Post by garvinhicking »

Hi!

I believe this can only happen if you try to install s9y when the tables already exist...so, as long as you start an installation into an existing database with NO tables that match your table prefix, this should never really happen.

Since the _authors table is probably not the only table missing input, you should start a fresh. DROP all tables with your table prefix, delete .htaccess and serendipity_config_local.inc.php and start a new installation. This should then create the tables again, and this time fill them with content.

The sql user account you used to install s9y does have INSERT privileges, right?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dalif
Regular
Posts: 40
Joined: Mon Aug 21, 2006 9:33 am
Location: Under your bed
Contact:

Re: Two installations on same dbase

Post by Dalif »

Heya Garvin

Yeah, I'm not sure how I did it, but things seem to be working now. The authors table didn't seem to have anything in it, but I flushed it anyway, deleted everything in the installation folder, and uploaded a completely new folder structure. Went with an easy 123456 type password (changed it immediately afterwards, of course), and went on with the installation. And it worked. I'm logged into the admin section.

Thanks for the help and input. And yes, I do have insert privileges :)

Until next time I have a problem, take care!
..|., 4tw
Post Reply