php site moved from 8 yr old server to new one. problems...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jackie1
Forum Newbie
Posts: 5
Joined: Sat Sep 13, 2014 6:40 pm

php site moved from 8 yr old server to new one. problems...

Post by Jackie1 »

It's mostly working , but on one of cart pages I get an error message on line 17 of a file called simlib.php.

When we edit the file and the error still remains. Even if we delete it. It makes no sense.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php site moved from 8 yr old server to new one. problems

Post by requinix »

So... how about telling us what the error is and posting your code?
Jackie1
Forum Newbie
Posts: 5
Joined: Sat Sep 13, 2014 6:40 pm

Re: php site moved from 8 yr old server to new one. problems

Post by Jackie1 »

Whoops:

Fatal error: Call to undefined function mhash() in /storage01/newhome/templates/simlib.php on line 17

But username on new server isn't called burmani, but it wants to point there no matter what we do.
Last edited by Jackie1 on Tue Sep 16, 2014 1:01 pm, edited 1 time in total.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php site moved from 8 yr old server to new one. problems

Post by requinix »

Can't help you with the username thing, but it seems like that's just what it's supposed to be. Doubt you can do much about it either.

mhash is a function in the mhash PHP extension. Seems it's not installed on your new server. Port the code to use mcrypt instead, which probably is available (though you should confirm that first, of course).
Jackie1
Forum Newbie
Posts: 5
Joined: Sat Sep 13, 2014 6:40 pm

Re: php site moved from 8 yr old server to new one. problems

Post by Jackie1 »

No, actually the new server has a new username and we can't get it to look for the new username. It's so strange. We changed to hash but error is same, it want to look for the old directories.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php site moved from 8 yr old server to new one. problems

Post by requinix »

The error has nothing to do with directories and everything to do with you trying to use a PHP extension that is not installed on your server. Since you can't install the extension, switch your code to mcrypt from mhash.
Jackie1
Forum Newbie
Posts: 5
Joined: Sat Sep 13, 2014 6:40 pm

Re: php site moved from 8 yr old server to new one. problems

Post by Jackie1 »

mcrypt is already on the server. We've changed that file and converted it, and it gives same error. That username it keeps showing also doesn't exist anymore. We make the change, and error doesn't change. No one can figure this out.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php site moved from 8 yr old server to new one. problems

Post by requinix »

If the error is still happening then you haven't changed the file and it's still trying to call mhash() somewhere in there.

Could there be some sort of web server caching in place? I've seen it happen with IIS. What if you delete the file and re-upload?
Jackie1
Forum Newbie
Posts: 5
Joined: Sat Sep 13, 2014 6:40 pm

Re: php site moved from 8 yr old server to new one. problems

Post by Jackie1 »

Ok, thank you, there was one main file that had the old username from the last server still in it!!! I thought I looked through everything, but just happened to miss this one file! Thanks so much for chiming in and making me look again.
Post Reply