| 1 | == 更新 PHP5 使支援 MSSQL == |
| 2 | |
| 3 | * [備忘] |
| 4 | * [參考] [http://www.libthomas.org/~thomas/wp/?p=10 PHP connect to MS SQL 2000] |
| 5 | {{{ |
| 6 | $ sudo apt-get build-dep php5 |
| 7 | $ sudo apt-get source php5 |
| 8 | $ vi php5-5.2.0/debian/rules |
| 9 | }}} |
| 10 | {{{ |
| 11 | #!diff |
| 12 | --- php5-5.2.0/debian/rules.bak 2008-06-21 18:39:12.000000000 +0800 |
| 13 | +++ php5-5.2.0/debian/rules 2008-06-21 18:25:45.000000000 +0800 |
| 14 | @@ -72,7 +72,6 @@ |
| 15 | --disable-rpath \ |
| 16 | --disable-static \ |
| 17 | --with-pic \ |
| 18 | + --with-mssql \ |
| 19 | --with-layout=GNU \ |
| 20 | --with-pear=/usr/share/php \ |
| 21 | --enable-calendar \ |
| 22 | }}} |
| 23 | {{{ |
| 24 | $ cd php5-5.2.0 |
| 25 | php5-5.2.0$ dpkg-buildpackage |
| 26 | }}} |
| 27 | * 為了避免以後又遇到類似的問題,我們需要暫時把 php5 相關的套件全部設成 hold |
| 28 | {{{ |
| 29 | $ dpkg -i php5-common*.deb |
| 30 | $ dpkg -i libapache2-mod-php5*.deb |
| 31 | $ cat > php5-on-hold.pkg.lst << EOF |
| 32 | libapache2-mod-php5 hold |
| 33 | php5-common hold |
| 34 | EOF |
| 35 | $ dpkg --set-selections < php5-on-hold.pkg.lst |
| 36 | $ dpkg --get-selections |
| 37 | }}} |
| 38 | |
| 39 | * [檢查] 可以用 phpinfo() 去查是否有支援 mssql |