system:
Linux web 2.6.27.21-0.1-pae #1 SMP 2009-03-31 14:50:44 +0200 i686 i686 i386 GNU/Linux
PHP Version 5.3.8
Apache Version Apache/2.2.21 (Linux/SUSE)
In my situation, the OracleDB server I was trying to connect to was a remote one, not a local one, so the above 127.0.0.1 localhost trick didn't work.
Previously, I had temporarily fixed a DNS problem by adding an entry for my Oracle DB server into my hosts file. This IP in my hosts file was still correct - it still pointed to the correct OracleDB server IP.
By removing the entry from my hosts file, the problem went away.
I have no idea why this is a problem for OracleDB, or why the error message is so obtuse, but I hope this helps someone else.
(This was using InstantClient v12.1.0.2 on MacOS v10.11.5)