Quoting the docs:
The standard DES-based crypt() returns the salt as the first two characters of the output. It also only uses the first eight characters of str, so longer strings that start with the same eight characters will generate the same result (when the same salt is used).
The salt you provide is only 4 or 5 characters long, which makes crypt use the standard DES-based algorithm. So, only the first 9 chars of password are used, and only the first two chars of salt are used. Therefore your hashes are equal. You really should update your PHP version so you can use the modern password_hash functions. If that's not possible, try using http://www.openwall.com/phpass/ which is compatible with PHP version 3 and above. If that's not possible read on...
You need to pass the salt in correct format to the crypt function. From the examples in the docs:
if (CRYPT_BLOWFISH == 1) {
echo 'Blowfish: ' . crypt('rasmuslerdorf', '$2a$07$usesomesillystringforsalt$') . "\n";
}
if (CRYPT_SHA256 == 1) {
echo 'SHA-256: ' . crypt('rasmuslerdorf', '$5$rounds=5000$usesomesillystringforsalt$') . "\n";
}
if (CRYPT_SHA512 == 1) {
echo 'SHA-512: ' . crypt('rasmuslerdorf', '$6$rounds=5000$usesomesillystringforsalt$') . "\n";
}
The beginning of the hash defines which algorithm to use. You also need to make sure that you use random unique salt for each user.