当前位置:网站首页>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 .
边栏推荐
- Axi low power interface
- Identification of new prognostic DNA methylation features in uveal melanoma by 11+ based on methylation group and transcriptome analysis~
- 我在深圳,到哪里开户比较好?现在网上开户安全么?
- Coinbase will launch the first encrypted derivative product for retail traders
- Speculation London gold short-term stable money making skills? Where is it safe to fry London gold?
- How to purchase new bonds is it safe to open an account
- JVM GC garbage collection detailed introduction quick check of learning notes
- The world's largest meat processor has been "blackmailed", how many industries will blackmail virus poison?
- 计组-总复习
- [digital ic/fpga] booth multiplier
猜你喜欢
Deep parsing and implementation of redis pub/sub publish subscribe mode message queue

FreeRTOS overview and experience

电商红包雨是如何实现的?拿去面试用(典型高并发)

计组-总复习

ArrayList#subList这四个坑,一不小心就中招

《梦华录》要大结局了,看超前点映不如先来学学它!
Database migration tool flyway vs liquibase (II)
[Architect (Part 41)] installation of server development and connection to redis database

FreeRTOS概述与体验

【数字IC/FPGA】Booth乘法器
随机推荐
如何优雅的写 Controller 层代码?
How to calculate the bandwidth of video transmission? How much bandwidth is required to transmit 4K video?
Programmer: after 5 years in a company with comfortable environment, do you want to continue to cook frogs in warm water or change jobs?
9+!通过深度学习从结直肠癌的组织学中预测淋巴结状态
GLOG从入门到入门
FreeRTOS概述与体验
GTEST from getting started to getting started
Continuous testing | test process improvement: practice continuous testing within iterations in coding
Opencv learning notes -- Separation of color channels and multi-channel mixing
Which commercial insurance endowment insurance is good? Ranking of commercial endowment insurance products in 2022
Opencv learning notes - loading and saving images
Tencent Youtu, together with Tencent security Tianyu and wechat, jointly launched an infringement protection scheme
[redisson] analysis of semaphore lock source code
Getting started with scrapy
打新债可以申请多少 开户是安全的吗
What is the reason why the video intelligent analysis platform easycvr is locally controllable but the superior equipment cannot control the subordinate equipment?
Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!
Detailed explanation of the execution order of the expression and loop body in the for loop
How to check the situation that the national standard platform easygbs equipment video cannot be accessed by grabbing packets?
Use go to process millions of requests per minute