Hey there,
Try this:
echo "$PKEY_Passphrase"
Also, you need to make sure that the env var is set and exported in your Apache user's runtime config file (usually .bashrc, or .cshrc, or something like that.) Otherwise it won't be available when the script is running because env vars don't persist across executions.
If this works for you, please award my bid and pay out the milestone. If it doesn't I'd be happy to help you further but I'm pretty sure the above is your issue.
Thanks,
George