Apart from the typical PHP-Apache setup, there are two things to keep in mind:
-
Ensure that the Linux system is set up to find the libraries that the ODBC driver requires.
- Add the <INSTALL-DIR>/Libs and <INSTALL-DIR>/ODBCDriver paths to the /etc/ld.so.conf file, where <INSTALL-DIR> is the location for the ODBC installation.
-
The following commands should be executed to refresh the ld cache and restart the Apache web server:
$/sbin/ldconfig $/etc/init.d/apachectl restart
-
To make sure that the ODBCSYSINI environment variable is available when PHP calls are made, use the following line in your PHP code:
#given ODBCSYSINI is to be set to /etc then: putenv("ODBCSYSINI=/etc")
You should not set up your own PHP or use /etc/init.d/apachectl on the queen for your own web pages.