I have been in partner with a a friend who has ran our site for quite some time now. He originally designed it, but he ran off to college, and left me in charge of it.

I've been working on a revamp of the website, but before I did so, I made a backup of the user database. I am currently working on the login sector of the site, and my friend is 10000% sure the hashes in the database are generated as so:

md5( md5($salt) . md5( $pass ) );

So I was coding the login system to these standards. To make sure I was doing everything right, I tested the output against the database hash information on one of my dummy accounts, which holds a really weak password: asdzxc

I took the salt + asdzxc and echoed it through; as so:

$salt = 'fks]';
$pass = 'asdzxc';
echo md5( md5($salt) . md5( $pass ) );

And it matched the hash in the database. Great! Us scientists like to run the experiment two or three times, however.

I used a password I knew was more advanced, it contains symbols and numbers only. Again, a dummy account.

$salt = 'tyu[';
$pass = '!!121a';
echo md5( md5($salt) . md5( $pass ) );

The hash output is 100% different from the hash in the database. I am 100% sure that:
*The password is correct (I can login to our sister server which shares the same database; however, I do not have access to the source code on that server)
*There are no extra "spaces" between value holders
*The correct salt is given

Why are symbols and numbers for my value giving me a different hash output while just alpha passwords are not, given:
md5( md5($salt) . md5( $pass ) );
I figured it out in regards to what is posted.

But Benjamin, this will not work for the life of me:
<?php
$salt = '|ad5=';
$new_pass = 'Q2XjhY32w5!e$AwP';
echo md5( md5($salt) . md5( $new_pass ) );
?>

I know $ is interpreted as a variable, so is there a certain way I need to define this?