dbtcp on SuSe 10.x

First off, to compile dbtcp as a PHP extension, you’ll need to have phpize installed. I didn’t, so I opened up YAST and click on PHP’s devel package. A YAST dependency warning is thrown, click remove php-devel, press OK, select ignore and OK.

Extract archive to /usr/src/dbtcp

>cd /usr/src/dbtcp

Opened MakeFile and added -fPIC to CCFLAGS (line 11)
Opended dbug/dbug.c and commented out IMPORT int fprintf(); (line 210)

>cd /usr/src/dbtcp/php/dbtcp
>./configure –with-dbtcp=/usr/src/dbtcp
>make install

Create a file, “/etc/php5/conf.d/dbtcp.ini” with contents of

>service apache2 restart

At this point dbtcp is installed and “good to go” on the SuSe box. Let’s try it out!

Run DBTCP.exe
I went ahead and clicked on the “Allowed IPs” icon (it’s the icon with the bust of a person) and typed in the IPAddress of the SuSe box.

Okay back to SuSe. We need a quick PHP script to test things out…


$dsn = "DSN=Projects";
$host = "";

$handle = dbtcp_connect($dsn,$host);

if(dbtcp_sql("SELECT * FROM sometable"))
while($row = dbtcp_fetch_assoc())


That’s it, you just saved yourself from buying a $1,500 driver 🙂

2 Replies to “dbtcp on SuSe 10.x”

  1. I was very happy to carry out the dbtcp configuration as you mentioned above but I wasn’t successful.
    my php -v command gives me
    “PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) ‘dbtcp.so’ in Uknow on line 0.”

    Any clue about this ?


  2. I have to wonder how that comparison would fare if it was Vista vs Linux? We bought a new HP Vista machine and converted an old WIn 2K based desktop to SUSE Linux – http://file.sh/SUSE+Linux+torrent.html . After 2 months the hassles with Linux are far fewer! There are hassles with both, but the Linux hassles are well documented and Novell ($60 SUSE Linux support) actually DOES provide solutions in real English! We are preparing to convert the new machine to Linux as well.

Leave a Reply

Your email address will not be published. Required fields are marked *