You wrote:
The strange thing is it has worked before
and we didn't change anything to the code.
We just physically moved some machines. (I
guess it doesn't like his new place... lol)
No, I guess it doesn't like the new location. Since your problem description doesn't give a lot of details, let me make a stab in the dark:
You had to reboot the problem machine
as part of the relocation. Right?
An ORA-12154 means that the Oracle client libraries PHP is using could not resolve your database service name. MOST OF THE TIME this means that the code or the Oracle client/server configuration(s) have changed.
The guess I am venturing is that the reboot changed the userID the webserver is/was running under. The new userID either doesn't have the correct Oracle client configuration or can't access the disk files it needs in order to connect to the database. When you "execute them on the commandline", you are using a properly (Oracle client) configured userID, or one with plenty of privileges (examples: root, Oracle, Administrator, IAMAGOD).
If you were to run your webserver under the 'works at commandline' userID, then everything would be fine. Or, check what userID the non-affected servers are running their webservers under, then try that userID.
Let me know if this helps resolve your problem.
-- Michael
Darkstreak Consulting
www.darkstreak.com