I just downloaded the latest thatware from CVS but I can't login as root. It seems to
be a problem in login() in user.php3 - does the table join in this subroutine really pick
up the root password ? I have crypt=0.
Thanks
Paul
I think I know what the problem is. -mat- made it so when you login it checks the user info and sets the user cookie from user.php3, but the problem is that for a cookie to set, it needs an extra page to load so by just sending an HTTP header to go back to admin.php3 it's not giving the cookie enough time to digest.
What needs to be done is to pass a user variable in the HTTP header in the login() function to mimic a cookie and have it encoded just as a cookie would be. For now, I bet if you reload the admin.php3 page after you login, it should let you in.
It's possible that that's not the problem and that what you did was use setup.php3 with $crypt set as one thing and then after you used setup.php3 you changed $crypt to 0. If that's the case, you just have to re-run setup.php3, but either way, the aforesaid about the cookie needs to be done.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Mmmm I admit I am installing over an older distro - however I still cannot login as root even
if I reload admin.php3
I haven't touched crypt - it was set at zero and I left it that way - I can see root and password
in the user table.
I am still confused by the join that is done at the beginning of login() - it joins users, users_home and
users_comments using the uid - but root has uid=1 and the other tables have uid=0 - this is from
a fresh install so there are no other entries in these tables.... if I do the select
command manually in mySQL and set userid=root then I get nothing returned.... try it :-)
I admit my SQL is a little rusty so I could be on the wrong track....
Thanks
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well I was about to close the bug report, but something still isn't right from what you're saying. I did the cookie mimic thing in CVS, but the root uid=1 isn't supposed to happen. The CVS copy I just downloaded clearly has the root uid set to insert as uid=0. I know on older versions root was set as uid=1 but I changed that 2+ weeks ago. I don't know how you're changing the uid to equal 'root' since the uid column is declared as an auto_increment integer. You sure you're just using either all the most recent CVS? I can't think of what else the problem would be...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the latest setup.php3 and there is a command to set 0,root as the UID/password.
As you say, users.uid is set as autoincrement - reading the mySQL manual it says that
autoincrement sequences start at 1 - is this where the problem lies ? I did a manual
insert command and I can't get the UID=0 even if I do
insert into users values (0,'root','$pass','1,2,3,4,5,6,7,8,9');
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I changed the root uid to 1 in the setup script. I had it at 0 before because my version of mysql was allowing an insert as uid=0 so I figured it'd be ok. If there are mysql versions out there that start at 0 and others that start at 1, this will be compatable with both... even if the second user created on the version that allows 0 makes them uid=0. I'll wait a day or two for a reply from you before I close the report, but I think that should do it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think I know what the problem is. -mat- made it so when you login it checks the user info and sets the user cookie from user.php3, but the problem is that for a cookie to set, it needs an extra page to load so by just sending an HTTP header to go back to admin.php3 it's not giving the cookie enough time to digest.
What needs to be done is to pass a user variable in the HTTP header in the login() function to mimic a cookie and have it encoded just as a cookie would be. For now, I bet if you reload the admin.php3 page after you login, it should let you in.
It's possible that that's not the problem and that what you did was use setup.php3 with $crypt set as one thing and then after you used setup.php3 you changed $crypt to 0. If that's the case, you just have to re-run setup.php3, but either way, the aforesaid about the cookie needs to be done.
Mmmm I admit I am installing over an older distro - however I still cannot login as root even
if I reload admin.php3
I haven't touched crypt - it was set at zero and I left it that way - I can see root and password
in the user table.
I am still confused by the join that is done at the beginning of login() - it joins users, users_home and
users_comments using the uid - but root has uid=1 and the other tables have uid=0 - this is from
a fresh install so there are no other entries in these tables.... if I do the select
command manually in mySQL and set userid=root then I get nothing returned.... try it :-)
I admit my SQL is a little rusty so I could be on the wrong track....
Thanks
Paul
Well I was about to close the bug report, but something still isn't right from what you're saying. I did the cookie mimic thing in CVS, but the root uid=1 isn't supposed to happen. The CVS copy I just downloaded clearly has the root uid set to insert as uid=0. I know on older versions root was set as uid=1 but I changed that 2+ weeks ago. I don't know how you're changing the uid to equal 'root' since the uid column is declared as an auto_increment integer. You sure you're just using either all the most recent CVS? I can't think of what else the problem would be...
I have the latest setup.php3 and there is a command to set 0,root as the UID/password.
As you say, users.uid is set as autoincrement - reading the mySQL manual it says that
autoincrement sequences start at 1 - is this where the problem lies ? I did a manual
insert command and I can't get the UID=0 even if I do
insert into users values (0,'root','$pass','1,2,3,4,5,6,7,8,9');
Paul
Ok, I changed the root uid to 1 in the setup script. I had it at 0 before because my version of mysql was allowing an insert as uid=0 so I figured it'd be ok. If there are mysql versions out there that start at 0 and others that start at 1, this will be compatable with both... even if the second user created on the version that allows 0 makes them uid=0. I'll wait a day or two for a reply from you before I close the report, but I think that should do it.
It works! Thanks, I can now login as root.
Paul
I'm done with this now.