|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24023 Extension issues with mssql / sybase_ct
Submitted: 2003-06-04 12:19 UTC Modified: 2003-06-07 14:29 UTC
From: andrew at solutionsfirst dot com dot au Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.3.1 OS: Debian/GNU Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: andrew at solutionsfirst dot com dot au
New email:
PHP Version: OS:


 [2003-06-04 12:19 UTC] andrew at solutionsfirst dot com dot au

On a plain vanilla i386 Debian system I've installed apache, php4, php4-pear and php4-sybase via apt-get. While native PHP functions for MSSQL work fine, connections to a database via PEAR DB abstraction reports "DB Error: extension not found". The DSN string starts as "mssql://".

At /usr/share/pear/DB/mssql.php:56, the following line incorrect because nor are ever installed via Debian packages to my knowledge; only 

    if (!DB::assertExtension('mssql') &&

Using the following replacement line seems to correct the problem for me.

    if (!DB::assertExtension('sybase_ct'))

This may be a Debian packaging issue only, but I'm not certain.


- Andrew


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-04 14:33 UTC]
Hi Andrew,

I´m not a PEAR::DB developer, so this is not an "official" answer, but just a tip:
Recompile your PHP with the option --with-mssql instead of --with-sybase_ct. Using the Sybase extension against an MSSQL server is possible, but sooner or later you´re going to run into compatibility issues.

Another option is to take a look at where you will find the best extension ATM to connect against MSSQL - it requires to install an additional component on the SQL server machine, though.

PEAR::DB´s MSSQL driver expects the MSSQL extension to function properly. Haven´t tested it with ODBTP yet. You won´t be able to use the tableInfo() method if you´re using Sybase. You might run into trouble using DB_FETCHMODE_ASSOC if you´re using Sybase.

You have been warned :-)

 [2003-06-07 02:19 UTC] andrew at solutionsfirst dot com dot au

Thanks very much for your comment. I will certainly try re-compiling PHP but had secretly hoped there was going to be a [Debian] packaged solution :-)

And yes, I had already experienced issues with DB_FETCHMODE_ASSOC, but thought I was on crack.


- Andrew
 [2003-06-07 14:29 UTC]
Fine then - good luck ;-)
Keep in mind that compiling using --with-mssql on Unix/Linux requires at least PHP 4.3.0 and, additionally, FreeTDS (which you should already have installed, as it´s used by the Sybase extension as well).

I´m closing the bug for now.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 18 05:07:33 2022 UTC