PHP - FreeTDS - UnixODBC - MS-SQL Am I missing something....
| From: | Bill Sappington | Date: | Thu, 12 Jun 2008 20:13:48 +0000 |
| Subject: | PHP - FreeTDS - UnixODBC - MS-SQL Am I missing something.... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-45070@lists.php.net to get a copy of this message | ||
Hey there folks...
OK, so I am getting to the point where I am not sure where to look...
It would seem that the combination of PHP & ODBC are just not happy.
This is running on SLES 10 SP1, php 5.1.2 Zend Eng 2.1.0
FreeTDS is latest stable, UNIXOdbc Latest Stable
I can connect just fine ie:
$conn = odbc_connect(SrvIP,'sa','saPWD');
Changing databases is not problem ie:
odbc_exec($conn,'use different_DB');
I can make calls to things like odbc_tables() and iterate through the
table names. and I can do this from either the server command line or
via a web page, all of this is fine.
I can connect to the remove database server with both:
tsql [serverip], [username],[password]
isql [DSN], [username],[password]
I can execute queries, I can create tables, drop tables, insert rows,
all works just fine.
The problem hits when I do something as simple as:
$conn = odbc_connect(SrvIP,'sa','saPWD');
$query = 'select count(*) from sysobjects' ;
$result = odbc_exec($conn,$query);
I try this and it is game over. Nothing it all just hangs. I have
tried reviewing the sql.log file and it just simply stops logging after
the connect statement.
This is the result, from either the command line ie:php5 sqltest.php or
pulling it from a web page ie: http://server/sqltest.php
I would be very appreciative if someone could provide me with a clue as
to where to start looking. I have reviewed all the setting for PHP,
Apache, ODBC, FreeTDS and I cannot find something wrong, but obviously,
I am missing something here.
Thanks in Advance,
- Bill