I spent ages trying work out why I was getting the following message when when using ocilogon() on Windows 2000 using PHP 4 and 5:
ORA-03106 Fatal two-task communication protocol error
This problem is occurs when PHP cannot find ORACLE client environmental variables.
The environmental variables can be set in several ways:
1. Within the root 'Directory' directive on Apache httpd.conf:
<Directory "d:/path/to/webroot">
SetEnv ORACLE_BASE "c:/oracle"
SetEnv ORACLE_HOME "c:/oracle/ora81"
SetEnv NLS_LANG "american_america.WE8DEC"
SetEnv NLS_CHARACTERSET "WE8DEC"
SetEnv NLS_NCHAR_CHARACTERSET "AL16UTF16"
</Directory>
or
2. Within Windows:
Go to the Control Panel>System>Advanced>Environmental Variables
Then enter a name value/pair for each of the variables.
3. Using putenv() statements in the PHP file prior to using ocilogon(). This is not ideal because the statements are required evertime you wish to connect to Oracle.