I have a PHP script that is executed using shell_exec(). In the script, I need to check whether the script is running on my development machine (using WampServer on Windows) or my production server (using Linux) because the database credentials are different and the script needs to know which set of credentials to use.
Because the script is executed in the shell, the $_SERVER variables are not set and I can't identify which machine the script is running on with this method (which is how I do it in other scripts).
How can I determine which server the script is running on when it is executed via shell?