{"id":1001,"date":"2014-05-21T13:37:27","date_gmt":"2014-05-21T05:37:27","guid":{"rendered":"http:\/\/hesiwei.cn\/?p=1001"},"modified":"2014-05-21T13:37:27","modified_gmt":"2014-05-21T05:37:27","slug":"mac%e4%b8%8b%e5%ae%89%e8%a3%85oci8%e6%89%a9%e5%b1%95%e6%9d%a5%e6%94%af%e6%8c%81php%e8%bf%9e%e6%8e%a5oracle","status":"publish","type":"post","link":"http:\/\/hesiwei.cn\/?p=1001","title":{"rendered":"mac\u4e0b\u5b89\u88c5oci8\u6269\u5c55\u6765\u652f\u6301php\u8fde\u63a5oracle"},"content":{"rendered":"<p>\u4e0b\u8f7doci8\u6269\u5c55\u5305\uff1a<br \/>\nhttp:\/\/pecl.php.net\/package\/oci8<\/p>\n<p>cd\u5230\u89e3\u538b\u76ee\u5f55\u6267\u884cphpize,\u53d1\u73b0\u9519\u8bef\uff0c<\/p>\n<p>\u9519\u8bef\u63d0\u793a\uff1a<br \/>\nCannot find autoconf. Please check your autoconf installation and the<br \/>\n$PHP_AUTOCONF environment variable. Then, rerun this script.<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a<br \/>\ncurl -OL http:\/\/ftpmirror.gnu.org\/autoconf\/autoconf-latest.tar.gztar xzf autoconf-latest.tar.gz<br \/>\ncd autoconf-*.\/configure &#8211;prefix=\/usr\/local<br \/>\nmake<br \/>\nsudo make install<\/p>\n<p><!--more-->phpize\u540e\u7ee7\u7eed\u5b89\u88c5<br \/>\n.\/configure &#8211;with-php-config=[php-config\u8def\u5f84]<\/p>\n<p>\u4e00\u4e2a\u8b66\u544a\uff1a<br \/>\nWARNING: OCI8 extension: ORACLE_HOME is not set, looking for default Oracle Instant Client instead<br \/>\nchecking Oracle Instant Client directory&#8230; configure: error: Oracle Instant Client directory \/usr\/lib\/oracle\/&#8230;\/client64\/lib libraries not found. Try &#8211;with-oci8=instantclient,DIR<br \/>\n\u770b\u6765\u8fd8\u5f97\u88c5oracle\u5ba2\u6237\u7aef\u3002<br \/>\n\u53bbhttp:\/\/www.oracle.com\/technetwork\/topics\/intel-macsoft-096467.html\u4e0b\u8f7d<br \/>\ninstantclient-basic-macos.x32-11.2.0.4.0.zip<br \/>\ninstantclient-sqlplus-macos.x32-11.2.0.4.0.zip<br \/>\ninstantclient-sdk-macos.x32-11.2.0.4.0.zip<\/p>\n<p>\u4e09\u4e2a\u6587\u4ef6\u89e3\u538b\u540e\u653e\u5230\u540c\u4e00\u6587\u4ef6\u5939\u5185\uff0c\u5168\u90e8\u79fb\u52a8\u5230\/usr\/local\/instantclient_11_2\/<\/p>\n<p>\u521b\u5efa\u8f6f\u8fde\u63a5<br \/>\nsudo ln -s \/usr\/local\/instantclient_11_2\/sdk\/include\/*.h \/usr\/local\/include\/<br \/>\nsudo ln -s \/usr\/local\/instantclient_11_2\/sqlplus \/usr\/local\/bin\/<br \/>\nsudo ln -s \/usr\/local\/instantclient_11_2\/*.dylib \/usr\/local\/lib\/<br \/>\nsudo ln -s \/usr\/local\/instantclient_11_2\/*.dylib.11.1 \/usr\/local\/lib\/<br \/>\nsudo ln -s \/usr\/local\/lib\/libclntsh.dylib.11.1 \/usr\/local\/lib\/libclntsh.dylib<\/p>\n<p>\u6d4b\u8bd5\u4e00\u4e0b\/usr\/local\/bin\/sqlplus\uff0c\u80fd\u8fd0\u884c\u8bf4\u660e\u6210\u529f\u4e86<\/p>\n<p>\u597d\u5427\uff0c\u7ee7\u7eed\u5b89\u88c5oci8\u6269\u5c55\u5305<br \/>\n.\/configure &#8211;with-php-config=[php-config\u8def\u5f84] &#8211;with-oci8=instantclient,\/usr\/local\/lib<\/p>\n<p>\u6700\u540e\u5728php.ini\u6587\u4ef6\u4e2d\u52a0\u5165<br \/>\nextension=oci8.so<br \/>\n\u91cd\u542fapache\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u8f7doci8\u6269\u5c55\u5305\uff1a http:\/\/pecl.php.net\/package\/oci8 cd\u5230\u89e3\u538b\u76ee\u5f55\u6267\u884cph [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17],"tags":[],"class_list":["post-1001","post","type-post","status-publish","format-standard","hentry","category-mac","category-php"],"_links":{"self":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts\/1001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1001"}],"version-history":[{"count":0,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts\/1001\/revisions"}],"wp:attachment":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}