I have a bash script that run on a Linux (AWS Centos) server. There's an odd, but annoying warning message that pops up in the stdout whenever the script executes psql: **could not find a "psql" to execute**.

What is odd is that that the Postgresql command line psql runs just fine! Yet it still generates this error message.

For further context, the bash script is executed from a shell\_exec in a php page (fastcgi/nginx). If you run the bash script from the command line, you don't see the warning. But again, even with the warning, psql does actually run properly.

Does anyone know why this warning appears, and how to eliminate it?