PHP failed to load successfully under Ubuntu oci8.so

Source: Internet
Author: User
Tags phpinfo
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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.