Skip to Content.
Sympa Menu

freetds - Restart apache server, FreeTDS stop running ? Help 911 !!!

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "bao nguyen" <baonguyenx AT yahoo.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Restart apache server, FreeTDS stop running ? Help 911 !!!
  • Date: Thu, 7 Dec 2000 03:35:47 -0500


Hi

Please Help 911!!!
I have successfully installed FreeTDS0.51 and compiled it with PHP4.0.2.
Also, I was able to run a script with select and insert statement on a
MSSQL 7.0 DB. However, when I restarted apache server, I couldn't execute
the script and got a message "Sybase: Unable to connect" .

What had I done wrong ?
Did I just shutdown the freetds process when I restart apache server?
How do I restart freetds service?
Do I need to add any environment variables to httpd.conf ?

Here was the complete process that I had done. Thanks for reading.

System Info: Linux6.1,FreeTDS0.51,PHP4.0.2, MySQL3.23.28,Apache1.3.9
DB Server: NT4.0, MSSQL 7.0, SP1

At the Directory /usr/local/
1. Install FreeTDS0.51
>tar -zxvf freetds-0.51.tgz
>cd freetds-0.51
>./configure --with-tdsver=4.2 --enable-msdblib --enable-dbmfix
--with-gnu-ld --enable-shared --enable-static
>make
>make install
By Default, it should install to /usr/local/freetds directory.

Set enviroment in bash Shell. Copy and paste these lines
> SYBASE=/usr/local/freetds
> LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
> export SYBASE LD_LIBRARY_PATH

Insert /usr/local/freetds/lib to etc/ld.so.conf
>ldconfig

Edit file /usr/local/freetds/interfaces
NTSVR4
query tcp tds4.2 207.120.42.150 1433
master tcp tds4.2 207.120.42.150 1433

2. Install PHP
Download the right version of freetds patch that is matched with your
PHPversion. For php4.0.2:
http://opensource.comvos.de/media/download/freetdspatch.tgz
>tar -zxvf php-4.0.2.tar.gz
>patch -p0 < patch.freetds
>cd php-4.0.2
>./configure --enable-track-vars --with-mysql=/usr/local/mysql
--with-apxs
--with-sybase-ct=/usr/local/freetds

Replace "dbopen" with "tdsdbopen" in
/usr/local/php4/ext/sysbase/php_sybase_db.c

>make
>make install

If you are using php4.0.1pl2, click here to download the patch
http://www.phpbuilder.com/columns/alberto20000919.zip

If you are using php4.0.3pl1, ask Alex for it alex AT quad.com.ar . You
can also go to, http://bugs.php.net/bugs.php?id=7792 and copy it.

Regards,
Bn




Archive powered by MHonArc 2.6.24.

Top of Page