Skip to Content.
Sympa Menu

freetds - [freetds] php odbc_exec problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lorenz, Marcus" <Marcus.Lorenz AT unilever.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] php odbc_exec problem
  • Date: Thu, 22 Jan 2009 14:05:30 -0000

Hello everybody,

i have a problem with the odbc_exec function in PHP. But first our
environment:
- Red Hat Enterprise Server 5.2 (32.Bit) with 64Bit processor
- unixODBC 2.2.11
- FreeTDS stable version available at the 16.12.2008
- MsSQL Server 2005 Enterprise 64Bit.

I've already written an email to the unixodbc support and they mentioned that
this should be a driver problem (See bottom of this e-mail)...

The problem is, that i can't execute any statements using parameter bindings.
If i include the parameters into the query directly i get the expected
results. If i pass them to odbc_execute as an array i only get the following
error:

odbc_mssql error: [00000: ° ±ÿÂ] in EXECUTE("select top 1 * from
master.Importstatus WHERE importer=? order by id desc")

The odbc_prepare() before returns a valid statement resource.

The id 00000 normaly means that the query could be executed successfully
(then why is it issuing tihs error?).

This is (a part of) the freetds.config:
[global]
# TDS protocol version
tds version = 8.0

This is (a part of) the odbc.ini:

[TransactionHub]
Driver = FreeTDS
Server = ###
Port = ###
Database = ###
UID = ###

I'm developing the same application under my own windows (i have to use
it...) environment and everything works fine. When i copy it to the
enterprise server using linux i get the descibed error.

So any help would be greatly appreciated.

Thank you.

Marcus.

Reply from unixodbc support:

>>RedHat is 32Bit:
>>2.6.18-92.1.18.el5xen #1 SMP Wed Nov 5 09:30:07 EST 2008 i686 athlon
>>i386 GNU/Linux
>>The Processor can also work with 64Bit software:
>>grep flags /proc/cpuinfo includes "lm"
>>So i have to ask the freetds support (right?)...
>That would be my suggestion




Archive powered by MHonArc 2.6.24.

Top of Page