#24023 [Opn->Csd]: Extension issues with mssql / sybase_ct

From: Date: Sat, 07 Jun 2003 19:29:29 +0000
Subject: #24023 [Opn->Csd]: Extension issues with mssql / sybase_ct
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17140@lists.php.net to get a copy of this message
ID: 24023 Updated by: mw21st@php.net Reported By: andrew at solutionsfirst dot com dot au -Status: Open +Status: Closed Bug Type: PEAR related Operating System: Debian/GNU Linux PHP Version: 4.3.1 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2003-06-07 02:19:54] andrew at solutionsfirst dot com dot au Markus, 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. Cheers, - Andrew ------------------------------------------------------------------------ [2003-06-04 14:33:21] mw21st@php.net 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 http://odbtp.sourceforge.net/ 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 :-) HTH, Markus ------------------------------------------------------------------------ [2003-06-04 12:19:43] andrew at solutionsfirst dot com dot au Hi, 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 mssql.so nor sybase.so are ever installed via Debian packages to my knowledge; only sybase_ct.so. if (!DB::assertExtension('mssql') && !DB::assertExtension('sybase')) 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. Thanks, - Andrew ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24023&edit=1

« previous php.pear.dev (#17140) next »