[eluser]Unknown[/eluser]
We have an app that requires the user email address to be encoded. The email is stored using encrypt->encode($user->email).
To retrieve the email we use encrypt->decode($user->email)
Everything was working perfect until we put the app onto a different server. Now when we attempt to decode any user email (that registered while the app was on the previous server) we get a bunch of special characters. Like the following:
�cQp.����h!��O���a^lʉ�I˓��f
Here is the strange part.
We can decode any user's email who registered after the server change. We cannot decode any user's email who registered before the server change.
Our assumption was that one server has mcrypt and the other did not (different encoding methods resulting in a failed decoding). This was not the case. Both servers have the exact same version of mcrypt enabled.
We also checked the following:
• The cipher and mode match on both servers
• Encoding in the app and DB are set to utf8.
• The encryption config key has not changed on either server.
• The email field allows more than 88 characters.
Does anyone have any idea what else could be going wrong here? Thanks for any help you can provide.