1 (edited by ihavenoidea 2004-03-24 20:48)

Topic: switched my database

hello.

i upgraded my win2k server to linux.
apache, mysql, and php are all working correctly.
i copied my site over and tried bringing the database over two ways. (exporting sql files, copying the contents of the data folder over, i even resinstalled the forum with the tar.gz file)

the problem now is that old users cant login anymore.  they get an incorrect username and password error.  however if i register a new test user on the site then they can login.  this leads me to believe that the md5 hashes are different between linux and windows.

i also think that my cookies might be a little messed up.  whenever i login on the linux server it marks every forum as unread.  even after i browse them it still says they have new posts. also if i login using IE with the new test user i login then instantly logout.

i hope its just some type of cookie deal.  i went threw alot of working getting a perfect linux server working just to find my forum doesnt like it.  sad

thanks for any help or tips.

2

Re: switched my database

If I am not mistaken, Punbb used SHA-1 When available, and when its not, it resorts to MD5. Maybe the OS change is aslo a php change?

Do, or do not.

Re: switched my database

yea actually.  i think im running version 4 and my server had 3.  still though all i did was dump the database to a .sql file.  i dont know why that would affect anything.

4

Re: switched my database

IF I am correct, the sql dump really dosent effect anything. If the windows did not support SHA-1, then it reverted to MD5, and now Linux is trying to read from a SHA-1 encrypted password. Or, it could be switched around.

Try this, make a new account on the Windows system, and then make another account on the linux system, and then compare the 2 password strings. If they are different, I am most probably correct. If they aren't, I am at a loss.

Do, or do not.

Re: switched my database

Well, if you were using PHP 4.3.0 (or later) on your linux box and is now using an earlier version on your Windows box, you have a problem. You have to either upgrade PHP on the Windows server or have all your users request a new password via the "Forgotten your password?" form.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: switched my database

ohh
im actually switching from windows to linux but your saying if i put 3.0 on the linux box it might work?

Re: switched my database

If by 3.0 you mean 4.3.0, yes. Just use the latest version available in the 4.* series.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: switched my database

wow. so just from 4.2 to 4.3 can make that much of a difference.  ill give it a try and get back to you.

here are screenshots from the linux and windows servers till i change it.
http://www.sporkit.com/misc_links/pictu … winSRV.jpg
http://www.sporkit.com/misc_links/pictu … lnxSRV.jpg

Re: switched my database

Yeah, upgrade the linux server and you will be home free.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

10 (edited by ihavenoidea 2004-03-26 09:17)

Re: switched my database

WooHoo!

finally got it working.  rather than mess around with uninstalling the old version of php i just went ahead and downloaded fedora core 1.  its sweet but pretty much the same thing as rh9.

http://www.sporkit.com/misc_links/pictu … SRVfix.jpg

annnnnyway.  still one more little problem i have left.  i figured fixing the database would make that login problem under IE go away but its still happening.  a user will login and see the successfull login screen but never actually login.  im not really sure what the deal with that is.  if you have any suggestions about this one too i would love to hear it.

btw ill admit i asked this php / mysql question on about 4 forums since i needed an answer asap but Rickard was the only guy to give me an answer that worked.

thanks man your amazing.

11

Re: switched my database

I think your problem now is cookies.

Do, or do not.

Re: switched my database

Yeah, it's most likely related to cookies. Do you have an URL where we can give it a go?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

13 (edited by ihavenoidea 2004-03-26 18:08)

Re: switched my database

currently im setting up the linux server on my local network while my router forwards traffic to the working windows server.  so i could forward to the linux server but would create quite a stir if members couldnt login.

i thought maybe since im accessing my server by its ip address that might cause a problem.  i get to the forums on the server by typing http://192.168.1.56/forums but already changed it to that address in the admin options menu.

since it works fine in mozilla and doesnt work in IE that might help us understand the problem.  once i wrote a script that worked perfectly in mozilla but wouldnt even show up in IE.  it was misinterpreting the code.  maybe its something like that?

Re: switched my database

Hmm, I don't know where to start explaining. If you are accessing you forum via an IP address, you have to set the cookie for that perticular IP. It's a bad idea. If you set a cookie for e.g. sporkit.com and then access the server via an IP address, IE6 believes you are setting a third party cookie and it doesn't allow that (by default). Either edit the IE6 cookie settings to allow third party cookies or wait until you have it setup correctly with the domain and everything.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

15

Re: switched my database

Actaully, I have had a Linux server running on a lan, with Punbb running, and cookies worked fine. Seems like a an IE issue. Try deleting cache, and deleting cookies, and check the security level.

Do, or do not.

Re: switched my database

I would actually say that it's an issue with every browser but IE. IE does it right by not accepting third party cookies without a valid P3P certificate.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

17 (edited by ihavenoidea 2004-03-26 22:45)

Re: switched my database

ok so i tried clearing cookies and have the levels set to default.  still gave me the same problem.  im pretty sure thats not it either since i had the linux server up for a day and had complaints from other people.

anyway, i can switch from the linux and windows server fairly quickly by simply changing my router to forward port 80 to either one. 

so what i did was make the linux server public. changed the base url.  accessed it from its domain name (www.fatalthugs.com/forum) and still had the same problem.  i was thinking though, in a few days i could just put the linux server up and change the link to the forum saying its down.  id give you guys the link to check it out so you can see whats happening for yourself.

unfoftunatly, we really need it up and working for the weekend.  probably monday ill change it to the linux server and give you guys the link to see for yourself.

thanks for the help so far.

Re: switched my database

Sure, no problem.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: switched my database

alrighty!

so i talked to Rickard on the #punbb channel (quakenet) and we solved the problem.

turns my servers date and time was set to like 1999.  this meant it was sending out cookies that should expire in one year.  IE was deleting them because it thought they were old.  fixed the date and fixed my problem.

thanks smile