当前位置:网站首页>Php7.3 centos7.9 installing sqlserver extensions
Php7.3 centos7.9 installing sqlserver extensions
2022-06-30 16:52:00 【BookNoteY】
php7.3 centos7.9 install sqlserver Expand
install sql server drive ( direct yum Get ready )
yum install msodbcsql mssql-tools unixODBC-devel
To php Expand the official website selection To follow sqlsrv,pdo_sqlsrv edition
sqlsrv Version selection :https://pecl.php.net/package/sqlsrv
pdo_sqlsrv Version selection :https://pecl.php.net/package/pdo_sqlsrv
View the corresponding details of each version :https://pecl.php.net/package-changelog.php?package=sqlsrv&release=5.10.1
Install the extension Here to install 5.6.1
Download source package cd To the location you downloaded
wget https://pecl.php.net/get/pdo_sqlsrv-5.6.1.tgz && wget https://pecl.php.net/get/sqlsrv-5.6.1.tgz
decompression
tar -zxvf pdo_sqlsrv-5.6.1.tgz && tar -zxvf sqlsrv-5.6.1.tgz
Compilation and installation
# pdo_sqlsrv
cd pdo_sqlsrv-5.6.1
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
# pdo_sqlsrv
cd pdo_sqlsrv-5.6.1
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
Modify the configuration file and restart php
vim /usr/local/php/etc/php.ini
# Add two lines after , Import extension file
extension=sqlsrv.so
extension=pdo_sqlsrv.so
# restart fpm, I used it here lnmp
lnmp restart
Don't forget to restart your php or php-fpm
Check whether the installation is successful , Generally, if there is no error reported above, it should be successful
php -m |grep sqlsrv
Existence is success
Set pieces
If there is such a problem
In file included from/root/sqlsrv-5.6.1/shared/typedefs for linux.h:23:0
from /root/sqlsrv-5.6.1/shared/xplat winnls.h:24, from /root/sqlsrv-5.6.1/shared/FormattedPrint.h:24
from /root/sqlsrv-5.6.1/shared/core sqlsrv.h:41, from /root/sqlsrv-5.6.1/php solsrvint.h:25
from /root/sqlsrv-5.6.1/conn.cpp:24:
/root/sqlsrv-5.6.1/shared/xplat.h:30:17: fatal error: sql.h: No such file or directory#include <sql.h>
It should be that you have not installed sqlserver Drivers are installed on the extensions , Errors will be reported at compile time
After installing the driver in the first step, you can recompile it
边栏推荐
- Etcd tutorial - Chapter 9 etcd implementation of distributed locks
- Exception class_ Log frame
- php7.3 centos7.9安装sqlserver扩展
- 容联云首发基于统信UOS的Rphone,打造国产化联络中心新生态
- 删除有序数组中的重复项 II[双指针--多情况统一]
- 观测云与 TDengine 达成深度合作,优化企业上云体验
- Bc1.2 PD protocol
- The image variables in the Halcon variable window are not displayed, and it is useless to restart the software and the computer
- go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
- Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API
猜你喜欢
随机推荐
【Verilog基础】关于Clock信号的一些概念总结(clock setup/hold、clock tree、clock skew、clock latency、clock transition..)
In order to make remote work unaffected, I wrote an internal chat room | community essay
详解Go语言中for循环,break和continue的使用
【微信小程序】小程序的宿主环境
为了使远程工作不受影响,我写了一个内部的聊天室 | 社区征文
Wechat emoticons are written into the judgment, and the OK and bomb you send may become "testimony in court"
Anaconda下安装Jupyter notebook
中国传奇教授李泽湘,正在批量制造独角兽
After 15 years of working on 21 types of hardware, where is Google?
MySQL8.0开启远程连接权限的方法步骤
Niuke.com: minimum cost of climbing stairs
云技能提升好伙伴,亚马逊云师兄今天正式营业
招标公告:天津市住房公积金管理中心数据库一体机及数据库软件项目(预算645万)
Additional: (not written yet, don't look at ~ ~ ~) webmvcconfigurer interface;
[machine learning] K-means clustering analysis
RT thread heap size Setting
Explain in detail the use of for loop, break and continue in go language
居家办公浅谈远程协助快速提效心得 | 社区征文
Bidding announcement: Taizhou Unicom Oracle all in one machine and database maintenance service project in 2022
Hundreds of lines of code to implement a JSON parser









