Page 1 of 2
major issue, nobody can log in - migrating host - SOLVED..
Posted: Tue Feb 21, 2006 8:29 am
by original89
Hi folks
has anyone got any ideas on this, bit of a disaster really... im in the process of migrating hosts and have run into a bit of a major issue, nobody can log in..
Thing is i get no SQL errors, no php errors and therfore dont have much to go on, globals are on in my php ini and i can view things in my website fine, but when i try and log into my user area it just refreshes the log in page.
During the process of migration the account was restored on the following and ive noticed that it now includes collation in MYSQL which appears to have defaulted to ' latin1_swedish_ci ', Ive checked the tables and the user_passwords etc encrypted all looks the same.
Here is a comparison of what my new host is and what my current host is..
new host
PHP version 4.4.2
MySQL version 4.1.13-standard
Welcome to phpMyAdmin 2.6.4-pl2
MySQL 4.1.13-standard running on localhost as me@localhost
Language : English (en-utf-8)
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_general_ci
old host
PHP Version 4.4.1
MySQL v4.0.26-standard.
Welcome to phpMyAdmin 2.6.4-pl2
MySQL 4.0.26-standard running on localhost as me@localhost
Language : English (en-iso-8859-15)
because this is a shared server, i doubt my host will downgrade anything. Or is it possibley something else.
any suggestions / assistance would be very well received its totally doing my head in.
Dave
Posted: Tue Feb 21, 2006 8:57 am
by feyd
Your server's are straddling a fundamental change in MySQL. For users the old server uses an old password encryption, while the new one uses a different encryption.
OLD_PASSWORD() should be used to get them logged in and changed to the new PASSWORD()
Posted: Tue Feb 21, 2006 9:44 am
by original89
hi feyd
thanks for that, that sound like it might be it.
Although this is the admin area of my application and not the database, although the users passwords are encrypted in the database.
eg
5f4dcc3b5aa765d61d8327deb882cf99
Does that make any difference. Does this mean i need to make some changes to my application and not MYSQL?
thanks
Dave
Posted: Tue Feb 21, 2006 9:48 am
by feyd
this affects the user your application logs into MySQL with only. If it can't connect, your users can't either.

Posted: Tue Feb 21, 2006 10:13 am
by original89
hi feyd
my db user can log in as the app is working and retrieving data, its just the users in the application that cant log in.
my users table has various columns including username and userpass now colated as latin1_swedish_ci .
eg in v4.1 it looks like this.
username pass collation
me dcc3b5aa765d61d8327deb882cf99 latin1_swedish_ci
eg in v4 it looks like this.
username pass
me dcc3b5aa765d61d8327deb882cf99
any suggestions?
many thanks.
Dave
Posted: Tue Feb 21, 2006 10:17 am
by feyd
the collation normally isn't much of a problem, however I always set it to UTF-8 to make sure it'll work for all the languages I tend to need support for (everything)
Posted: Tue Feb 21, 2006 10:32 am
by original89
hi
so do you think my user names / passwords might not be the issue, originally
they would have been input with something like
$md5_pass = md5($user_pass);
originally this was case sensitive against v4
and the v4.1 upgrade is now looking up the values using
$md5_pass = md5($user_pass);
so would this mean that
username = me
and
password =
dcc3b5aa765d61d8327deb882cf99
should still work?
im very confused.
Is there a global way of changing everything to UTF-8
Posted: Tue Feb 21, 2006 10:39 am
by feyd
I don't see any reason they aren't working as the hashes are showing up the same. It may be an issue related to other code that just so happens to end up affecting this.
From what I remember, the default for collation is set in the MySQL startup configuration file. Your host may be able to help you with changing that.
Posted: Tue Feb 21, 2006 10:44 am
by original89
mmn not when im on a shared server they wont..
i dont know what to do now..

Posted: Tue Feb 21, 2006 10:46 am
by feyd
Talk to them. Shared hosts above all others should be ones to have UTF-8 set for collation.
Posted: Tue Feb 21, 2006 11:07 am
by original89
thanks, they are suggesting to go onto a vps solution.
if i change it on the table / column should i use
utf8_bin for case sensitive.?
is there any way to pass this in my connect string so all connection use this?
or do you think i can force this in my php?
Posted: Tue Feb 21, 2006 11:13 am
by feyd
if you set the field to BINARY, it'll be case sensitive.
did you ever solve this login to user web accounts
Posted: Sat Feb 25, 2006 1:59 pm
by glav
Hi, I am having the same problems as you with loging in to user and admin sections of a site I have moved to a newer version og PHP. Did you manage to solve it. I have read the manuals and have done everything they said but no luck. Please help.

Posted: Sat Feb 25, 2006 4:51 pm
by original89
hi
yeah its working okay, i had a problem with my php.ini file and that the format had changed for registering globals to on and to set the session id.
this was the old one
register_globals = On
session.use_trans_sid = 0
it now looks like this
Code: Select all
register_globals = yes
session.use_trans_sid = yes
i also had to copy it into all sub directories for some reason..
i dunno why, but it works
Thanks I'll try that.
Posted: Tue Feb 28, 2006 11:34 am
by glav
by the way, where did you get your solution from? because i'm going nuts with alot of my scripts. some are not mine and are a pain in the ass to edit and i'm not sure i have permission to do that anyway. my own seam to be working but i did have to make some cookie changes.
in my php.ini file
register_globals = on
so i'll change this to 'yes'
are there any other 'on's' that need to be 'yes'
i have never configured php or mysql or apache beore and would appicate all the help i can get
thanks and best regards,
glav