当前位置:网站首页>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 .
边栏推荐
- Reading at night -- about microservices and containers
- 怎样申请打新债 开户是安全的吗
- How is the e-commerce red envelope realized? For interview (typical high concurrency)
- Embedded must learn! Detailed explanation of hardware resource interface - based on arm am335x development board (Part 1)
- 9+!通过深度学习从结直肠癌的组织学中预测淋巴结状态
- [5 minutes to play lighthouse] create an immersive markdown writing environment
- 怎么申请打新债 开户是安全的吗
- 可变参数模板实现max(接受多个参数,两种实现方式)
- 10 zeros of D
- d的10个0符
猜你喜欢

Programmers spend most of their time not writing code, but...

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

Install Kali on the U disk and persist it
![[live review] battle code pioneer phase 7: how third-party application developers contribute to open source](/img/fa/e52bd8a1a404a759ef6ba88e8da0f0.png)
[live review] battle code pioneer phase 7: how third-party application developers contribute to open source

FreeRTOS overview and experience

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

如何优雅的写 Controller 层代码?

Opencv learning notes - loading and saving images

GLOG从入门到入门

万名校园开发者花式玩AI,亮点看这张图就够啦!
随机推荐
Istio FAQ: istio init crash
Adjustment method of easynvr video platform equipment channel page display error
Opencv learning notes -- Separation of color channels and multi-channel mixing
万名校园开发者花式玩AI,亮点看这张图就够啦!
10 zeros of D
GLOG from getting started to getting started
Pipeline post instruction
2021-06-02: given the head node of a search binary tree, it will be transformed into an ordered two-way linked list with head and tail connected.
链接器 --- Linker
12+!不同癌症中TMB与ICI反应之间的免疫相关因素研究
[5 minutes to play lighthouse] create an immersive markdown writing environment
RTMP streaming platform easydss video on demand interface search bar development label fuzzy query process introduction
11+! Methylation modification patterns based on m6A regulatory factors in colon cancer are characterized by different tumor microenvironment immune spectra
Installation and operation of libuv
Clickhouse uses distributed join of pose series
Is it safe to open an account for how many new bonds you can apply for
Example of SMS interface verification code function implemented by ThinkPHP framework
Coinbase will launch the first encrypted derivative product for retail traders
怎样申请打新债 开户是安全的吗
Cryptography series: collision defense and collision attack