I have compiled and installed Apache, PHP, and UnixODBC on QNX Neutrino 6.2.1. The database I am using is Empress. Apache and PHP are working together. UnixODBC is working as I have tested it with iSQL and successfully connected to the Empress database. I have built PHP with UnixODBC. When I use PHP from the command line, PHP connects successfully to the Empress database using UnixODBC. However, when I build PHP with UnixODBC, restart Apache, and open the PHP script in a browser, I get an error ...

Warning: odbc_pconnect(): SQL error: [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed, SQL state IM005 in SQLConnect in /usr/local/apache_1.3.27/share/apache/htdocs/test.php on line 3

It seems there is only an error connecting to the database when trying to connect from Apache using PHP with UnixODBC. UnixODBC works, PHP with UnixODBC works from command line, but as soon as Apache is included in the mix, I get the above error.

Why would this happen?