安装配置 php,PHP 安装/配置

用户评论:

dragos at rdss dot ro (2011-05-03 09:59:25)

mssql install-setup as so on linux:

get freetds package

1. wget ftp://ftp.ibiblio.org/pub/Linux/

ALPHA/freetds/stable/freetds-stable.tgz

2. uncompress and cd 2 sources folder

3. ./configure --enable-msdblib --prefix=/usr/local/freetds

4. make

5. make install

copy some supplementary files

6. cp include/tds.h /usr/local/freetds/include

7. cp src/tds/.libs/libtds.a /usr/local/freetds/lib

get php devel sources if you don't have it and install it

get php sourcers files, uncompress it, chdir

8. chdir ext/mssql

8. phpize

9. ./configure --with-mssql=/usr/local/freetds

10. make

11. cp modules/mssql.so phpextensionpath, or make install

12. echo "/usr/local/freetds/lib" >> /etc/ld.so.conf

and

echo "export FREETDSCONF=/usr/local/freetds/etc/freetds.conf" >> /etc/profile

add in extension section

13. extension=mssql.so to php.ini

add in httpd.conf right above "Include /etc/httpd/mod_php.conf"

14.SetEnv FREETDSCONF /usr/local/freetds/etc/freetds.conf

15. set you server connection in /usr/local/freetds/etc/freetds.conf

for testing w/o reboot server:

16. export FREETDSCONF=/usr/local/freetds/etc/freetds.conf

17. restart apache

18. verify mssql enabled with phpinfo()

19. run your test script.

20. other fine tunnigs and settings

pls. keep in mind:

- your ms SQL must be setup with socket listing ;)

- check windoze box firewall to accept TCP 1433 connection.

Enjoy!

Dragos

robyn at dcphp dot com (2010-12-13 07:31:14)

http://www.apachefriends.org/en/xampp-macosx.html

This links to xampp works great on macs. I have put it only for PPC machines, but it claims to work properly on Intel as well.

I also had success installing FreeTDS and PHP from source on an Intel Macbook, running Mac OS 10.6 (Snow Leopard). My steps were the following:

PREPARE SOURCE CODE

step 1: download latest php version

step 2: un-tar the php source code

step 3: download latest freetds version

step 4: un-tar the freetds source code

INSTALL THE FREETDS

step 5: make sure there is a writable directory at /usr/local/freetds

step 6: "cd" to the freetds source directory

step 7: run "sudo ./configure --prefix=/usr/local/freetds --enable-msdblib"

step 8: run "sudo make"

step 9: run "sudo make install"

step 10: run "touch /usr/local/freetds/include/tds.h" (add blank, but necessary files)

step 11: run "touch /usr/local/freetds/lib/libtds.a" (add blank, but necessary files)

INSTALL THE PHP

step 11: "cd" to the php source directory

step 12: run "sudo ./configure --disable-all --with-mssql=/usr/local/freetds"

step 13: run "sudo make"

step 14: run "sudo make install"

Of course, since I was disabling-all (step 12) that means that you have to explicitly add back those modules you want to configure php with.

mark dot treble at marktreble dot co dot uk (2010-05-26 11:28:20)

If anybody is looking for the api documentation now - (26 May 2010), it can be found at:

http://msdn.microsoft.com/en-us/library/cc296152%28SQL.90%29.aspx

opc dot three at gmail dot com (2009-06-01 20:03:31)

A new version of "Microsoft SQL Server Driver for PHP" (originally named "Microsoft SQL Server 2005 Driver for PHP") has been released that supports SQL Server 2008:

http://sql2k5php.codeplex.com

The driver leverages the ODBC driver included in the "Microsoft SQL Server 2008 Native Client" thus this PHP lib will only run on Windows.

You can download the ODBC driver from Microsoft's website for free as well at:

http://www.microsoft.com/downloads/details.aspx?FamilyId=228DE03F-3B5A-428A-923F-58A033D316E1&displaylang=en#SNAC

robert dot johnson at icap dot com (2008-09-24 03:49:21)

Microsoft have provided a PHP driver for SQL Server 2005.

At the time of this note, the link to it is: http://msdn.microsoft.com/en-us/library/cc296221.aspx

If that doesn't work, search MSDN for "SQL Server 2005 Driver for PHP"

ksamuels at pleazNOSPAM dot sportsendeavors dot COM (2008-06-18 13:55:14)

I was having a difficult time getting four Windows 2003 Servers to connect to an MSSQL database with PHP 5.2.5 and IIS after already getting one such server to connect with no problems. I even copied the entire php directory and dlls to the other servers exactly as they were on the working server but continually got "Unable to connect to server" errors. The fix was to delete the ntwdblib.dll from the PHP directory. It was already in the C:\windows\system32 directory and this did not cause a problem on the first server but did on all the others.

jklowden at freetds dot org (2008-05-27 10:06:15)

The 30-character limitation does not apply to the FreeTDS db-lib implementation. FreeTDS returns column names of any length supported by the server (and protocol).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值