PHP 5.3 Configuration MSSQL Notes

Source: Internet
Author: User
Tags mssql

Reference URL Https://docs.moodle.org/29/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Debian_Lenny

The first step is to download the appropriate DLL

PHP version Thread Safe FreeTDS version Download URL
PHP 5.2.x (VC6) Yes 0.82 + 20090302 Patches download!
No 0.82 + 20090302 Patches download!
PHP 5.3.x (VC6) Yes 0.82 + 20090904 Patches (unconfirmed) download!
No 0.82 + 20090904 Patches (unconfirmed) download!
PHP 5.3.x (VC9) Yes 0.82 + 20090904 Patches download!
No 0.82 + 20090904 Patches download!

Step two, add Extension=php_dblib.dll to the php.ini.

Step three, restart IIS

Sample code to test if the connection is OK

<? PHP     $link = mssql_connect (' localhost ', ' db_user ', ' Db_password ');     if (! $link {        echo' Could not connect ';          die (' Could not connect: '. mssql_error ());    }     Echo' successful connection ';    Mssql_close ($link);? >

PHP 5.3 Configuration MSSQL Notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.