To "store passwords safely" you would need to look at many factors, since even a top-encrypted data file in public may represent an attack vector.
Since you're specifically asking in relation to PHP 5.2.17, I would like to point you to the multitude of Cryptography Extensions which might (or might not) come installed alongside of your PHP install. Most often (at least, according to my personal experience) you will find that the Mcrypt extension is available. If it is, check the function mcrypt_list_algorithms, which returns an array of all supported ciphers. You'll be sure to find something as good as blowfish (or even better) in there.
Besides that, I don't want to press that "Post Your Answer" button without saying that you will do your security good by storing the data in a safe place. This may be a database, or even flatfile... but in case of flatfile storage, make sure the files are not publicaly accessible to avoid unwanted security holes.