简体   繁体   中英

How to use PHP with MSSQL (PEAR MDB2?)

I've spent about half of my day trying to figure out how to get PEAR MDB2 to work with MSSQL. I've gotten to the point where I'm missing php_mssql.dll. No idea where to find it or how to get it. What I'm wondering is if anybody can explain, from scratch, how to set up php with PEAR MDB2 to work with MSSQL.

The results on the internet say things like "use the msi" well the msi doesn't exist for newer versions of php. Then it says "build with [these options]" well how the heck do I do that? Why is it so impossible to use php and MSSQL?

Or perhaps I'm approaching this the wrong way. Should I abandon PEAR completely? What is the fastest way to get set up with PHP and connecting to a Microsoft SQL database?

MDB2 just lays on top of the native php mssql extension . This is what you need first. You probably have the file already in your windows installation, search for it in your php directory.

Then enable it in php.ini and restart your web server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM