当前位置:网站首页>Installing sqlserver extension PDO of PHP under Linux_ sqlsrv
Installing sqlserver extension PDO of PHP under Linux_ sqlsrv
2022-06-24 12:28:00 【Mongolia Shangdan 2】
1. Set up yum Install source
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssqlrelease.repo
2. Install dependent components
yum -y install msodbcsql mssql-tools unixODBC-devel
There is a risk of mistakes , Follow the instructions , It can be solved by adding parameters :
yum -y --disablerepo=packages-microsoft-com-prodyum install yum --disablerepo=packages-microsoft-com-prod msodbcsql mssql-tools unixODBC-devel
3. Download installation package
The choice here is 5.6.1 edition
wget http://pecl.php.net/get/pdo_sqlsrv-5.6.1.tgz
4. install
First decompress
tar -xvf pdo_sqlsrv-5.6.1.tgz cd pdo_sqlsrv-5.6.1
The following execution path is based on your own php Path modification :
/usr/local/services/php-7.2/bin/phpize ./configure --with-php-config=/usr/local/services/php-7.2/bin/php-config make && make install
After installation , The system will prompt you for the installation path , For example, my execution result is :
Installing shared extensions: /usr/local/services/php-7.2/lib/php/extensions/no-debug-non-zts-20170718/
5. modify php.ini
Find you. php.ini route , Usually in php In the directory of etc/php.ini. My is
/usr/local/services/php-7.2/etc/php.ini
Add a line at the end of the file :
extension=pdo_sqlsrv.so
6. verification
There are two ways to verify , One is to write a php file , Then check it out php Information :
<?php phpinfo();
If the displayed results show pdo_sqlsrv It means that it can operate normally
Another way is to execute the command :
/usr/local/services/php-7.2/bin/php --ri pdo_sqlsrv
The following results will be printed :
pdo_sqlsrv pdo_sqlsrv support => enabled ExtensionVer => 5.6.1 Directive => Local Value => Master Value pdo_sqlsrv.log_severity => 0 => 0 pdo_sqlsrv.client_buffer_max_kb_size => 10240 => 10240
This means that the extension can run normally .
边栏推荐
- 基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例
- JVM GC garbage collection detailed introduction quick check of learning notes
- Programmers spend most of their time not writing code, but...
- Opencv learning notes - cv:: mat class
- Listed JD Logistics: breaking through again
- How stupid of me to hire a bunch of programmers who can only "Google"!
- 怎样申购打新债 开户是安全的吗
- How to calculate the bandwidth of video transmission? How much bandwidth is required to transmit 4K video?
- Install MySQL in docker and modify my CNF profile
- 怎样打新债具体操作 开户是安全的吗
猜你喜欢
GLOG从入门到入门
ArrayList#subList这四个坑,一不小心就中招
Opencv learning notes - loading and saving images
New progress in the construction of meituan's Flink based real-time data warehouse platform
GLOG from getting started to getting started
"Meng Hua Lu" is about to have a grand finale. It's better to learn it first than to look ahead!
【Go语言刷题篇】Go从0到入门4:切片的高级用法、初级复习与Map入门学习
[mysql_16] variables, process control and cursors
万名校园开发者花式玩AI,亮点看这张图就够啦!
Axi low power interface
随机推荐
Tencent security monthly report - zero trust development trend forum, digital Expo Technology Award, Mercedes Benz security research results
The world's largest meat processor has been "blackmailed", how many industries will blackmail virus poison?
Chenglixin research group of Shenzhen People's hospital proposed a new method of multi group data in the diagnosis and prognosis analysis of hepatocellular carcinoma megps
可变参数模板实现max(接受多个参数,两种实现方式)
Which commercial insurance endowment insurance is good? Ranking of commercial endowment insurance products in 2022
Install Kali on the U disk and persist it
怎么可以打新债 开户是安全的吗
[2021 techo youth dry goods sorting post, there is always one you are interested in]
The solution of distributed system: directory, message queue, transaction system and others
JVM GC garbage collection detailed introduction quick check of learning notes
[5 minutes to play lighthouse] create an immersive markdown writing environment
Detailed explanation of the execution order of the expression and loop body in the for loop
Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!
How can a shell script (.Sh file) not automatically close or flash back after execution?
[cloud based co creation] interpretation of harmonyos application and service ecology
National standard platform easygbs administrator assigns roles to sub users and troubleshooting of invalid channels
2022年有什么低门槛的理财产品?钱不多
Fbnet/fbnetv2/fbnetv3: Facebook's lightweight network exploration in NAS | lightweight network
怎么申请打新债 开户是安全的吗
Istio FAQ: istio init crash