I have a PHP script that’s stored and run on my local computer only — it’s used to access a remote server.
Is there a way to securely store a password used by the script? I don’t think PHP can access Keychain, or a secure disk image, so I’m wondering if there’s another way?
Thanks.
If the machine or the PHP code is compromised, an attacker will have access to the PHP source and will be free to recreate whatever complicated steps you’re willing to take. Just save your password in a folder outside of the document root and make sure your script isn’t vulnerable to code injection.