当前位置:网站首页>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 .
边栏推荐
- FreeRTOS概述与体验
- [digital ic/fpga] booth multiplier
- [day ui] alert component learning
- Cloud native database: the outlet of the database, you can also take off
- New progress in the construction of meituan's Flink based real-time data warehouse platform
- 链接器 --- Linker
- Is GF Securities reliable? Is it safe to open a securities account?
- National standard platform easygbs administrator assigns roles to sub users and troubleshooting of invalid channels
- 不用做实验的6分+基因家族纯生信思路~
- 电商红包雨是如何实现的?拿去面试用(典型高并发)
猜你喜欢

GLOG from getting started to getting started

【Go语言刷题篇】Go从0到入门4:切片的高级用法、初级复习与Map入门学习

QT -- the qtabwidget supports dragging tabbar items

Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!

Install Kali on the U disk and persist it

Insurance app aging service evaluation analysis 2022 issue 06

我真傻,招了一堆只会“谷歌”的程序员!
![[go language questions] go from 0 to entry 4: advanced usage of slice, elementary review and introduction to map](/img/7a/16b481753d7d57f50dc8787eec8a1a.png)
[go language questions] go from 0 to entry 4: advanced usage of slice, elementary review and introduction to map

New progress in the construction of meituan's Flink based real-time data warehouse platform

FreeRTOS overview and experience
随机推荐
The latest hot spot: the use of copper death related genes for tumor prognosis typing!
Conceptual analysis of DDD Domain Driven Design
巧妙构思-铁死亡调节因子分型预后发6+
打新债的条件 开户是安全的吗
哪个商业保险养老险好?2022年商业养老保险产品排名
Installation and operation of libuv
I'm in Shenzhen. Where can I open an account? Is it safe to open an account online now?
Kubernetes best practice: graceful termination
Cryptography series: collision defense and collision attack
深圳市人民医院程立新课题组提出多组学数据在肝细胞癌的诊断与预后分析的新方法meGPS
FreeRTOS概述与体验
The idea of "6 points + gene family" without experiment~
Clickhouse uses distributed join of pose series
Which commercial insurance endowment insurance is good? Ranking of commercial endowment insurance products in 2022
[go language questions] go from 0 to entry 4: advanced usage of slice, elementary review and introduction to map
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
广发证券靠谱吗?开证券账户安全吗?
Detailed explanation of the execution order of the expression and loop body in the for loop
Reading at night -- about microservices and containers
炒伦敦金短线稳定赚钱技巧?在哪里炒伦敦金安全靠谱?