By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

php accessing MS-SQL Server on windows

P: n/a
I will be creating a small web site using php/apache/SQL Server running
on a Win2000 server. It sounds as if there a number of alternatives
for accessing SQL Server: mssql* functions, ADOdb object, using a ADO
COM object, ODBC calls, etc. Has anybody out there evaluated the
alternatives for speed, error handling, quality of documentation, etc?
TIA

Sep 28 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Don't use ADO COM--it leaks memory when used in PHP. The mssql_*
functions have the problem of truncating varchars longer than 255
characters (need to cast them to text type first), but work fine
otherwise.

Sep 28 '05 #2

P: n/a
Do not use the MSSQL functions -- they fucking suck, filled with errors
and you'll struggle to get long text values out of fields over 255
characters in length. I beat my head on them for weeks before I
abandoned MS SQL Server as a PHP database. ADOdb is leaking as Chung
Leong said but the ODBC functions are now performing well for me .....
they appear to be the only stable alternative.

If you are using the MS SQL Server functions you supposidly bypass the
255 character issue however you'll need some extra software to install
and I never managed to get them running.

It is worth noting that this is not the fault of PHP but the SQL Server
itself -- you can trip similar issues using ASP.

Sep 28 '05 #3

P: n/a

James wrote:
Do not use the MSSQL functions -- they fucking suck, filled with errors
and you'll struggle to get long text values out of fields over 255
characters in length. I beat my head on them for weeks before I
abandoned MS SQL Server as a PHP database. ADOdb is leaking as Chung
Leong said but the ODBC functions are now performing well for me .....
they appear to be the only stable alternative.

If you are using the MS SQL Server functions you supposidly bypass the
255 character issue however you'll need some extra software to install
and I never managed to get them running.

It is worth noting that this is not the fault of PHP but the SQL Server
itself -- you can trip similar issues using ASP.


Are you referring to the same thing as Chung Leong? I think Chung is
referring to creating an ADO COM object in PHP, whereas you are
referring to the ADOdb Pear class. If neither works well, the point is
moot.

Are the ODBC functions in a class or are they an API?

TIA

Sep 29 '05 #4

P: n/a
I was referring to the ADO COM -- I've avoided Pear for a while, I feel
like its overly abstract and cumbersomly slow. Re: ODBC -- Its a built
in function set on Windows PHP install - just a regular extension on
every other platform.

Sep 29 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.