Connecting Tech Pros Worldwide Forums | Help | Site Map

php accessing MS-SQL Server on windows

amorphous999
Guest
 
Posts: n/a
#1: Sep 28 '05
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


Chung Leong
Guest
 
Posts: n/a
#2: Sep 28 '05

re: php accessing MS-SQL Server on windows


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.

James
Guest
 
Posts: n/a
#3: Sep 29 '05

re: php accessing MS-SQL Server on windows


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.

amorphous999
Guest
 
Posts: n/a
#4: Sep 29 '05

re: php accessing MS-SQL Server on windows



James wrote:[color=blue]
> 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.[/color]

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

James
Guest
 
Posts: n/a
#5: Sep 29 '05

re: php accessing MS-SQL Server on windows


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.

Closed Thread