unixodbc

segfault with unixODBC (DB2) + PHP + CentOS

余生长醉 提交于 2019-12-11 00:08:56
问题 After 2 days battling, I try asking help here. I'm using unixODBC (2.2.11) to work with DB2 (iSeries) and PHP (5.3) on a CentOS 5.4 server. I guess it's since the upgrade of PHP from 5.1 to 5.3, I get PHP to segfault on certain queries. After some investigation, I discovered the problem appears on some queries with long char fields, for example with this table : TABLE ( CONTRACTID NUMERIC, SOMETEXT CHAR(583) ) This simple piece of code provokes the segfault : try { $conn = new PDO("odbc:".

PDOException: SQLSTATE 01002 Adaptive Server connection failed (severity 9)

大城市里の小女人 提交于 2019-12-10 20:49:59
问题 I have been following some answers over stackoverflow. My odbc. ini (located in /etc/odbc.ini) [MSSQL] Description = MS SQL Server Driver = /usr/local/lib/libtdsodbc.so Server = host.of.the.server UID = myusername PWD = mypassword ReadOnly = No Port = 1433 tds version = 8.0 My odbcinst.ini [FreeTDS] Description = FreeTDS driver Driver = /usr/local/lib/libtdsodbc.so Setup=/usr/lib/odbc/libtdsS.so FileUsage = 1 UsageCount = 1 Both of these files are empty at first. I just copied answer from the

How to connect to windows SQL Server from Ubuntu

随声附和 提交于 2019-12-10 14:38:22
问题 For the past two days I have been trying to connect to a remote windows SQL server with no apparent success. I am trying to connect with python using the pyodbc package. I have tried following all the blog posts out there for that matter without much luck. I first followed that one which I think makes a good effort but ends up being too incoherent IMO. I have installed the unixODBC manager as proposed in the blog post. I have downloaded the available redhat packages from Windows and run the

Php pdo unixOBDC to sqlserver 2008: String data, length mismatch when execute prepared stmt

我是研究僧i 提交于 2019-12-10 12:20:04
问题 I have the following setup: Apache / php 5.3 / pdo with odbc with installed Microsoft SQL Server ODBC Driver 1.0 for Linux on server. My script rises an error with the following stacktrace when trying to execute a statement: (UTC) 2013-12-16 12:07:40: Thrown exception log -> 'Error message: SQLSTATE[22026]: String data, length mismatch: 0 [Microsoft][SQL Server Native Client 11.0]String data, length mismatch (SQLExecute[0] at /tmp/pear/temp/PDO_ODBC/odbc_stmt.c:133) Arisen in Core_Db->select

How do I get connection pooling working on a PHP-CGI PDO iSeries Access UnixODBC Connection?

杀马特。学长 韩版系。学妹 提交于 2019-12-09 18:58:47
问题 I am trying to get connection pooling working using PHP/PDO with a UnixODBC driver called iSeries Access for Linux. I do not set the PDO::ATTR_PERSISTENT in my PDO constructor as I want to use pooling and not persistence (I am in a PHP-CGI environment). Using the "Connection Pooling" section of http://www.ibm.com/developerworks/systems/library/es-linux_bestpract.html I have placed Pooling = Yes in my odbc.ini and CPTimeout = 600 in my odbcinst.ini However, it seems that the ODBC driver is not

FREETDS and UNIXODBC character converting

拜拜、爱过 提交于 2019-12-09 12:52:22
问题 ive got an error to fix. its: [FreeTDS][SQL Server]Error converting characters into server's character set. Some character(s) could not be converted when i use turkish characters to insert i get this error. my question is how can i disable that converting thing? im connecting to sql server via freetds and unixodbc. thanks.. 回答1: You need to set client charset = UTF-8 in your freetds.conf file and read it from odbc.ini by setting the Servername option to the connection definition in freetds

odbc unable to connect to MSSQL data source on OS X Lion

浪尽此生 提交于 2019-12-08 18:39:47
问题 odbc isql was unable to connect to data source: $ isql SMS_GTWY username password -v returns: [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source [01000][unixODBC][FreeTDS][SQL Server]Unknown host machine name. [ISQL]ERROR: Could not SQLConnect while tsql is ok: $ tsql -S SERVER001 -U username -P password returns: locale is "C/UTF-8/C/C/C/C" locale charset is "UTF-8" using default charset "UTF8" 1> $ cat ~/.freetds.conf : [SERVER001] host = 192.168.8.101 port = 1433 tds

The same error is detected in stored **procedure**, but not in stored **function**

自闭症网瘾萝莉.ら 提交于 2019-12-08 08:43:41
问题 This question is related to my previous one: RaiseError (PERL, DBI) equivalent for unixODBC C API? As I isolated the problem later, I'll post new question, that is more specific, isolated and without unnecessary information. Version: unixODBC 2.3.0 lib: unixODBC - C API Suppose I have a stored FUNCTION : CREATE FUNCTION "test".func() RETURNING LVARCHAR(1000); set debug file to '/home/directory_does_not_exists/unknown.log'; trace off; trace on; trace off; return 'result is set here'; END

Error connecting to MS SQL Server using pyODBC, unixODBC and FreeTDS (on a Mac)

不羁岁月 提交于 2019-12-08 02:04:29
问题 I am getting an error when trying to connect to a MS SQL server in python, using the pyODBC --> unixODBC --> FreeTDS --> MS SQL stack. I’ve spent a lot of time on this, and there are some great resources if you’ve reached this question with more fundamental problems getting a connection to work here and here. However, my question is regarding an error that (I think) is very close to the finish line of this very frustrating experience. Specifically, this code in jupyter notebook: pyodbc

Using UnixODBC and FreeTDS to connect to Pervasive SQL server in ubuntu?

别说谁变了你拦得住时间么 提交于 2019-12-07 15:20:33
问题 I am trying to connect to a Pervasive Sql Server which is running on Windows 10 from an Ubuntu 14.04.4 server. I am using the following services to try connect to the server: FreeTDS unixODBC Before starting I tried to ping the host machine from the vm console with success. I then run the following command to check FreeTDS has installed correctly; tsql -C Which returned: Compile-time settings (established with the "configure" script) Version: freetds v0.95.95 freetds.conf directory: /usr