Want to implement PHP in Ubuntu to connect the Oracle database, downloaded and extracted instantclient, placed in the/opt/oracle/instantclient directory.
Use pecl install OCI8, compile successfully, automatically put in/usr/lib/php5/2009...../
PHP.ini inside added extension=oci8.so;
/etc/enviroment File Settings path= $PATH:/opt/oracle/instantclient
Supposedly restart the computer can successfully load the Oci8 module, but phpinfo () display or not loaded, the page shows the Apache enviroment path value or the default/usr/bin,/usr/sbin,/bin, does not appear/opt/ Oracle/instantclient.
Enviroment's path value is still the default yes. I think the problem should be here, that is, the Oracle side of the library is not loaded in.
Earlier in Window Server 2003, the use of Windows Oracle Client also has the problem, the other is not loaded, and finally looked at the event log, is not in accordance with the C + + library, it is difficult to Ubuntu also have to install a library?
Reply to discussion (solution)
extension=oci8.so; Let's change this to the complete path.
The problem should not be here, from Phpinfo () above see, Extension_dir=/usr/lib/php5/20090626+lfs, this oci8.so is in here, I feel should be the client's library did not add in
Is your version of this client compatible with the server?
In the window
PHP is php_oci8.dll via Oci.dll with Oracle.
The Oci.dll is carried by the Oracle client.
It should be the same in Linux.
Oracle is constantly upgrading and PHP cannot write interface programs for every Oracle version
Therefore, the scheme of using OCI8 extension to connect Oracle Client interface OCI is adopted.
Check with Phpinfo.
Extension=/usr/local/lib/php/extensions/no-debug-non-zts-20060613/oci8.so
/usr/local/apache2/bin/apachectl restart
Reference: http://www.wanghan.org/wordpress/?p=94
Php-m See if there's an error.
Problem found, found in log is not installed Libaio1