[freetds] PHP and DSN-less Connection Strings

Joerg Behrens behrens at takenet.de
Fri Mar 18 05:33:50 EST 2005


----- Original Message ----- 
From: "Jon Doblados" <jon.doblados at gmail.com>
To: "FreeTDS Development Group" <freetds at lists.ibiblio.org>
Sent: Friday, March 18, 2005 10:21 AM
Subject: Re: [freetds] PHP and DSN-less Connection Strings


> On Fri, 18 Mar 2005 09:32:45 +0100, Joerg Behrens <behrens at takenet.de> wrote:
>
> > That means your php version is build without ODBC support or the extension isnt loaded during
> > startup. Most current Linux distributions use shared extensions which can be enabled in the
php.ini
> > or loading during runtime with the dl('foo.so') function.
> >
> > extension_dir= /path/to/extensions
> > extension=foo.so
>
> Ah yes, I figured that much. I tried copying
> /usr/local/freetds/lib/libtdsodbc.so (from freetds FAQ) to
> /usr/lib/php/extensions only to find out that I don't have
> libtdsodbc.so, as I only see libtds.so.

Stop!
Read Daniel Fazekas mail that explain why this is the wrong way:)

A PHP shared extensions is creating during normal php build process when using something like.
./configure --with-foo=shared,/paht/to . The most extension can build in this way but not all.

For ppl that would like to update or build a new or a 3.party extension there is a shorter way
cd php-5.x;
cd ext/foo;
phpize;
./configure --with-foo=shared,/paht/to
make
In the ext folder of the php sourcetree the command 'phpize' [1]creates a small configure only for
that one extension. So it need less 1 minute of time to build a single extension.
make install copies the file 'foo.so' into the extension directory.

regards
Joerg

[1] phpize is part of every php installation. It depends of the distribution if it installed by
default or not and from which package.

-- 
TakeNet GmbH   Mobil: 0171/60 57 963
D-97080 Wuerzburg  Tel: +49 931 903-2243
Alfred-Nobel-Straße 20  Fax: +49 931 903-3025




More information about the FreeTDS mailing list