Reputation: 23
I'm having a very strange issue. I'm using unixODBC with FreeTDS to connect to MSSQL server.
If I perform an SQL command using odbc_exec that results in a valid query, instead of rendering the PHP, I get a prompt to download my php file, which if I accept ends up downloading an empty file.
If I purposefully break my SQL with an improperly formatted statement, the page successfully renders and displays the error statement.
If I use the command line isql to connect to my database and run the query, I am able to get a result on the command line level.
CentOS 5.5 64bit
MSSQL 2005 SP3
unixODBC 2.3.0
FreeTDS 0.82
PHP 5.3.5
Upvotes: 0
Views: 460
Reputation: 1143
What happens if you run the page using php on the command line? If its a 64 bit install it may be a result of PHP being built with a different sizeof( SQLLEN ) from unixODBC and or FreeTDS. Was the PHP built against the unixODBC on the machine or installed from a package?
Upvotes: 0