[unixODBC-support] Prompt ok, PHP no.. :(

cadastros at daniellima.net cadastros at daniellima.net
Mon Aug 14 18:33:59 BST 2006


Lets see if I can make any progress here :D

I'm using SuSe 9.3, PHP 4, Apache 2 with unixODBC and FreeTDS.

I made all the things that I had to connect to my SQL Server.

In prompt it works greatfully:

isql -v MSSQLTestServer X x

When it comes to PHP I did:

$connect = odbc_connect("MSSQLTestServer", "X", "x");
$query = "SELECT * FROM products";
$result = odbc_exec($connect, $query);

while(odbc_fetch_row($result)) {
 $field1 = odbc_result($result, 1);
 $field2 = odbc_result($result, 2);
 print("$field1 $field2\n");
}

odbc_close($connect);

In isql mode it works fantatisc but in PHP it seens that no aswers ins
given... I think PHP is not able to talk to unixODBC and FreeTDS.

The PHP error is somethink like "Empty page" (apache error)...

Somebody makes any idea of what is wrong..

Thanks

Daniel LIma

P.S: I've tried every single tip that I found on php help about
odbc_connect...



More information about the unixODBC-support mailing list