简体   繁体   中英

Error loading PHP OCI8 extension

I used PECL to install the OCI8 extension on Mac OS X 10.7. However, PHP won't load it:

Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/oci8.so' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20100525/oci8.so, 9): Library not loaded: /ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1 Referenced from: /usr/local/lib/php/extensions/no-debug-non-zts-20100525/oci8.so Reason: image not found in Unknown on line 0a

Has anyone else had this experience? Might I be missing something?

Consider putting oci8.so to /usr/local/lib/php/extensions/no-debug-non-zts-20100525/ manually.

Also, following the suggestion given in this topic , you could try going to /usr/local/lib/php.ini , trying to find extension=oci8.so statement and commenting it out, if found.

Finally, if neither of the methods above work, check this article .

This turned out to be the solution for me. I already had oci8.so in my extensions directory, and commenting/uncommenting from php.ini didn't make any difference. I had to get apache to understand where to find the Oracle Instant Client.

Oracle instantclient DYLD_LIBRARY_PATH error

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM