freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
PHP4 Release + FreeTDS {0.50 / CVS} + FreeBSD 3.3 does not connect + MSSQL 7
- From: "Paul Andersen" <paul-ml AT egate.net>
- To: freetds
- Subject: PHP4 Release + FreeTDS {0.50 / CVS} + FreeBSD 3.3 does not connect + MSSQL 7
- Date: Tue, 20 Jun 2000 23:15:29
Hi All,
My brain is very fried but I will try and be as detailed as I can be:
I am simply trying to get PHP4 to talk to MS-SQL 7.0. Here are some
details:
Overall Problem:
this script:
<?php
putenv("SYBASE=/www2/build/FreeTDS");
echo getmypid();
echo 'Connecting...';
$sybase_id = sybase_connect('test', 'valid_user', 'valid_pass');
echo 'id: ' . $sybase_id;
sybase_select_db('sn_dev', $sybase_id);
?>
isn't working.
Further digging found out that sybase_id was null (or a null string)
I hacked around in php4 and found out that this is the problem area:
--- from ext/sybase/sybase.c
/* create the link */
if ((sybase.link=dbopen(sybase.login,host))==FAIL) {
/*php_error(E_WARNING,"Sybase: Unable to connect to server:
%s",sybase_error(sybase));*/
efree(hashed_details);
dbloginfree(sybase.login);
RETURN_FALSE;
}
--- specifically that dbopen was obviously set to fail.
I tried logging the problem by enabling the dump file but it never created
anything.
Some other details
* uname -a:
FreeBSD odin.egate.net 3.3-RELEASE FreeBSD 3.3-RELEASE #0
* FreeTDS versions used: CVS and 0.50
* Running PHP as an APXS module
* ./configure lines
FreeTDS:
./configure --prefix=/www2/build/FreeTDS --with-tdsver=7.0
-- or --
./configure --prefix=/www2/build/FreeTDS --with-tdsver=4.2
-- or --
./configure --prefix=/www2/build/FreeTDS --with-tdsver=7.0 --enable-
-enable-dbmfix
PHP4:
./configure --with-mysql -with-apxs=/www2/apache/bin/apxs
--enable-track-vars --enable-dbase --with-sybase-ct=/www2/build/FreeTDS
-- or --
./configure --with-mysql -with-apxs=/www2/apache/bin/apxs
--enable-track-vars --enable-dbase --with-sybase=/www2/build/FreeTDS
* I have been trying mostly with the --with-sybase. I tried the ct and
found I needed to hack php4's makefile (ripping libraries out) to ensure it
worked
* sqsh seems to work without any issue (well it connects and I can do
simple selects)
Interfaces file:
test
query tcp ether 216.235.1.2 1433
master tcp ether 216.235.1.3 1433
Can anyone... Anyone... ANYONE lead me to what is foul here?
p.
- PHP4 Release + FreeTDS {0.50 / CVS} + FreeBSD 3.3 does not connect + MSSQL 7, Paul Andersen, 06/20/2000
Archive powered by MHonArc 2.6.24.