php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8151 Restart apache server, FreeTDS stop running ? Help 911 !!!
Submitted: 2000-12-07 03:47 UTC Modified: 2001-11-27 05:40 UTC
From: baonguyenx at yahoo dot com Assigned:
Status: Not a bug Package: Sybase-ct (ctlib) related
PHP Version: 4.0.2 OS: Linux 6.1
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: baonguyenx at yahoo dot com
New email:
PHP Version: OS:

 

 [2000-12-07 03:47 UTC] baonguyenx at yahoo dot com
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@quad.com.ar . You 
can also go to, http://bugs.php.net/bugs.php?id=7792 and copy it.

Regards,
Bn

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-27 05:40 UTC] sander@php.net
Probably not a bug in PHP. Ask support questions on the appropriate mailinglist.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC