当前位置:网站首页>PHP connecting to SQL Server
PHP connecting to SQL Server
2022-07-23 13:32:00 【wiscourper_】
One 、 Download the extension
sqlsrv,pdo-sqlsrv
see php edition 
Download the corresponding extension pdo_sqlsrv\sqlsrv
Pay attention to system support requirements System requirements
Two 、 Install the extensions
Unzip downloaded files
pdo_sqlsrv
# decompression
tar -zxvf pdo_sqlsrv-5.8.1.tgz
# Enter the unzipped directory
cd pdo_sqlsrv-5.8.1
# perform phpize
/www/server/php/74/bin/phpize
# perform ./configure, Configure the software to be installed , Check whether the current environment meets the dependency of the software to be installed
./configure --with-php-config=/www/server/php/74/bin/php-config
# Compile and install
make && make install
# If nothing else , Get the following similar content
# .... Omit other information ....
Installing shared extensions: /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/
sqlsrv Installation and pdo_sqlsrv equally 3、 ... and 、php Extended configuration
stay php.ini Add
# Extended Directory
extension_dir = "/Applications/MAMP/bin/php/php7.4.2/lib/php/extensions/no-debug-non-zts-20190902/"
# expanded memory bank
extension=sqlsrv.so
extension=pdo_sqlsrv.soFour 、sql server Configuration manager configuration
1) Server port 1433 Internet development , Add a specified port to the firewall ( Such as 1433) Entry rules for
2)sql server Configuration manager

Turn on tcp/ip agreement .tcp/ip attribute , Listen to all , Enable
ip Address ,ipall Remove dynamic ports , Fill in the fixed port 1433

Corresponding version sql native client Turn on tcp

5、 ... and 、sqlserver The instance configuration
Set to allow remote connections

Security : Set mixed login mode
Security / Login name / Specific users , Right click -> attribute

6、 ... and 、 Download the corresponding version of odbc The driver ( Conduct sql server Connect the test )
边栏推荐
- Summary of time complexity( Ο Is the asymptotic upper bound, Ω is the asymptotic lower bound, P, NP, NP hard, NPC problem)
- "100 Android interview questions" I brushed angrily for Dachang
- Google面试题原理解析 12个乒乓球其中有1个次品,用天平称重3次找出
- 当输入网址后,到网页显示,期间发生了什么
- 云解决方案,为什么选择 AMD EPYC?
- PHP framework MVC class code audit
- 0722~线程池扩展
- 倍福PLC和C#通过ADS通信传输String数组类型变量
- Uncaught (in promise) Neo4jError: WebSocket connection failure. Due to security constraints in your
- C语言插入排序(直接插入排序)
猜你喜欢

0722~ thread pool extension

Beihui information is 12 years old | happy birthday

功能测试转自动化测试,十年自动化测试经验分享

第八天笔记
Introduction to JVM memory model

GOM引擎版本为什么玩家会自动掉线或闪退?

MySQL - composite query external connection

com.mysql.cj.jdbc.exceptions. MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value:
![[daily training] 814. Binary tree pruning](/img/c1/d71e6190a1855a392689b55503f75e.png)
[daily training] 814. Binary tree pruning

Day 8 notes
随机推荐
Beifu PLC and C transmit string array type variables through ads communication
In depth interpretation of EVM's ecological Empire
Beifu PLC and C transmit string type through ads communication
第九天笔记
【可視化調度軟件】上海道寧為SMB組織帶來NETRONIC下載、試用、教程
Space shooting part 2-2: enemy spirit
使用fastjson解析以及赋予json数据时,json字段顺序不一致问题
【NOI模拟赛】不知是哪一道CF的论文题(概率期望,鞅的停时定理)
[jzof] 10 Fibonacci series
Complex networks - common drawing software and libraries
【JZOF】08 二叉树的下一个结点
倍福和C#通过ADS通信传输Real类型
Communicate 11 tips for poor performance 
Beifu PLC and C transmit int type variables through ads communication
Changes in the pattern of NFT trading market: from one dominant company to a hundred schools of thought
【 Visual Dispatching Software】 Shanghai Dow Ning apporte netronic download, Trial, tutoriel pour l'Organisation SMB
[jzof] 07 rebuild binary tree
吴恩达机器学习系列篇p31~p42
太空射击 Part 1: 玩家精灵和控制
【JZOF】12矩阵中的路径