What are the common pitfalls when setting up PHP to work with Oracle, particularly in a Windows environment?

Common pitfalls when setting up PHP to work with Oracle in a Windows environment include not properly configuring the PHP extension for Oracle, not setting the correct Oracle environment variables, and not having the necessary Oracle client libraries installed. To solve these issues, make sure to download the appropriate Oracle Instant Client and set the necessary environment variables in the Windows system settings.

// Example of setting Oracle environment variables in PHP
putenv('ORACLE_HOME=C:\path\to\oracle\instantclient');
putenv('TNS_ADMIN=C:\path\to\oracle\network\admin');