Hi

Thank you in advance for the replies I will be getting.. Much appreciated.

Basically I am running the following mysql query using PDO

UPDATE users SET password = AES_ENCRYPT(:password,:supersalt)

Now the issue is..

on one computer I am getting ¶z8Ibﶘé®òŒd­Y in the password field but on another its blank. or sometimes

not sure what is causing the different results.

mysql version: 5.6.15
PHP: 5.6.16
Apache: 2.4.7

same versions on both PCs

Thanks

The issue I am having is that one computer its working and another computer its not .. so not sure what could be different..

fields on both computers are varchar(200) but works in one and not in other..

not sure if I need to set anything in mysql config file or any other config files such as Apache config or PHP config.

Convert to raw after encrypt and save as raw data in to the db.

when you say blank, do you mean null or an empty string?

Also, have you tried just running a hash by itself and seeing what the output is? (ie, select AES_ENCRYPT("string", "foo"); )

Also, since you're passing through PDO I assume you migrated machines or something like that - are you sure your PDO vars are being set correctly? If you pass in an err val for one of the parse vars, it's possible that would explain the empty value as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.