{"id":1092,"date":"2021-09-08T00:24:37","date_gmt":"2021-09-07T16:24:37","guid":{"rendered":"http:\/\/www.tra56.com\/?p=1092"},"modified":"2021-09-08T00:24:37","modified_gmt":"2021-09-07T16:24:37","slug":"1092","status":"publish","type":"post","link":"https:\/\/www.tra56.com\/1092.html","title":{"rendered":"\u5b9d\u5854\u5b89\u88c5pdo_sqlsrv\u6269\u5c55"},"content":{"rendered":"
<\/p>\n
\u5b9d\u5854\u9762\u677f\u7684PHP\u5b89\u88c5\u8def\u5f84\u4e3a\/www\/server\/php\/ \u4e14\u652f\u6301\u591a\u4e2aPHP\u7248\u672c\u5171\u5b58\uff0c\u6240\u4ee5\u5b89\u88c5PHP\u6269\u5c55\u7684\u65b9\u6cd5\u4e0e\u7f51\u4e0a\u90a3\u4e9b\u793a\u4f8b\u7565\u6709\u4e0d\u540c<\/p>\n
\u64cd\u4f5c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n
#\u52a0\u5165\u5fae\u8f6f\u7684\u6e90\r\ncurl https:\/\/packages.microsoft.com\/config\/rhel\/7\/prod.repo > \/etc\/yum.repos.d\/mssqlrelease.repo\r\n\r\n#\u5b89\u88c5\u9a71\u52a8\r\nyum install msodbcsql mssql-tools unixODBC-devel\r\n\r\n#\u4e0b\u8f7dpdo_sqlsrv\u6269\u5c55\u5305 http:\/\/pecl.php.net\/package\/pdo_sqlsrv\r\nwget http:\/\/pecl.php.net\/get\/pdo_sqlsrv-5.8.1.tgz\r\n\r\ntar -zxvf pdo_sqlsrv-5.8.1.tgz\r\ncd pdo_sqlsrv-5.8.1\r\n\r\n#\u4f7f\u7528\u5bf9\u5e94php\u7248\u672c\u7684phpize 74\u4ee3\u8868\u7684\u662fphp\u7684\u7248\u672c\u53f7\r\n\/www\/server\/php\/74\/bin\/phpize\r\n\r\n.\/configure --with-php-config=\/www\/server\/php\/74\/bin\/php-config\r\n\r\nmake && make install\r\n\r\n#\u52a0\u5165\u6269\u5c55\r\necho "extension = pdo_sqlsrv.so" >> \/www\/server\/php\/74\/etc\/php.ini\r\n\r\n\/etc\/init.d\/php-fpm-74 reload\r\n\r\n#\u68c0\u67e5\u6269\u5c55\u662f\u5426\u5b89\u88c5\u6210\u529f\r\n\/www\/server\/php\/74\/bin\/php -m|grep -i sqlsrv<\/pre>\n<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5b9d\u5854\u9762\u677f\u7684PHP\u5b89\u88c5\u8def\u5f84\u4e3a\/www\/server\/php\/ \u4e14\u652f\u6301\u591a\u4e2aPHP\u7248\u672c\u5171\u5b58\uff0c\u6240\u4ee5\u5b89\u88c5PHP\u6269\u5c55\u7684\u65b9\u6cd5 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[],"class_list":["post-1092","post","type-post","status-publish","format-standard","hentry","category-hyperf"],"_links":{"self":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/1092"}],"collection":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/comments?post=1092"}],"version-history":[{"count":1,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/1092\/revisions"}],"predecessor-version":[{"id":1093,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/1092\/revisions\/1093"}],"wp:attachment":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/media?parent=1092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/categories?post=1092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/tags?post=1092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}