Questions tagged [pdo-odbc]

PDO_ODBC is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to databases through ODBC drivers or through the IBM DB2 Call Level Interface (DB2 CLI) library. https://php.net/manual/en/ref.pdo-odbc.php

PDO_ODBC is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to databases through ODBC drivers or through the IBM DB2 Call Level Interface (DB2 CLI) library.

PDO_ODBC currently supports three different "flavors" of database drivers. For additional details see https://php.net/manual/en/ref.pdo-odbc.php

20 questions
3
votes
0 answers

PDO does not throw exception with multiple queries

How can I get PDO to throw an exception when executing multiple queries? If I run the erroneous sql by itself: $execute($ddl_partial); $execute($insert); Then I get the expected error: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]:…
Jeff Puckett
  • 37,464
  • 17
  • 118
  • 167
2
votes
1 answer

How to enable PDO_ODBC on Linux?

I want to run Microsoft Access Database using PDO_ODBC (on Centos 7 x64 bit). But unfortunately i get this error on the page : could not find driver First of all i am looking the problem through my connection.php, but seems like there is no problem…
2
votes
1 answer

Connection busy to MS SQL Server on Linux using Zend Framework 2 and ODBC Driver

I needed to migrate a Windows server setup to a Linux (Red Hat 7.2) server. Previously we used the pdo_sqlsrv driver on the Windows machine. On the Linux we've installed the pdo_odbc driver. But since Zend Framework 2 doesn't support this out of the…
ReBorn
  • 111
  • 1
  • 8
2
votes
1 answer

PDO_ODBC and unixODBC cannot connect MSSQL with non-default port

I have to connect two MSSQL servers on php/linux environment. So I decide to use unixODBC and PDO_ODBC. mssql on server1: 10.10.10.5:1433 mssql on server2: 10.10.10.8:14233 (non-default port number) I think there is a port problem of PDO_ODBC or…
ukits
  • 67
  • 1
  • 11
2
votes
1 answer

Invalid cursor state - pdo_odbc FreeTDS SQL Server

We're running a completely nonchalant query and are getting the following error: PDOException : SQLSTATE[24000]: Invalid cursor state: 0 [FreeTDS][SQL Server]Invalid cursor state (SQLExecute[0] at…
Rob Forrest
  • 7,329
  • 7
  • 52
  • 69
1
vote
2 answers

Unable to connect to MSSQL PHP7 with PDO: unixODBC

Firstly, I apologize because I have minimal experience with Linux so I may just not be understanding something obvious. Ultimately, I am trying to query a MSSQL database via PHP. I have installed freetds and unixODBC. I confirmed the setup with…
Vlnflt
  • 103
  • 1
  • 7
1
vote
1 answer

How to execute Mssql Stored Procedure with Output Parameter on PDO(ODBC Driver)?

I using ODBC Driver(at host) and sqlsrv Driver(at local) for PDO. Successfully inserted the tables data but, i not handle output parameter,I did tried this; $query->fetch(PDO::FETCH_ASSOC); $db->query("SELECT…
1
vote
1 answer

Use Symfony2 with PDO_odbc and use services and repositories for connection and queries

For my company I'm working on a Symfony webapp that needs to fetch users and businesses from the database. However I am forced to use an ODBC connection. I went with pdo_odbc and this is working fine from the controller (Connection, queries,…
Kees Sonnema
  • 5,759
  • 6
  • 51
  • 106
0
votes
1 answer

Cannot connect to DB2 via PDO_ODBC

I got odbc.ini setup with DSN to local DB2 Community edition v11.5.7 database. It runs on port 25010. I've verified it can connect via telnet localhost 25010. PDO_ODBC extension is also installed and enabled. The problem came when trying to connect…
devXen
  • 3,013
  • 3
  • 35
  • 44
0
votes
0 answers

What might cause segfaults in PDO_ODBC with PHP8?

The setup is Debian (or more precisely, the php:8.1-apache docker image with is Debian based.) The problem is not new in php:8.1[...], but also occurs on php:8.0[...] I have the odbcinst1debian2, libodbc1, odbcinst and unixodbc packages…
0
votes
0 answers

Why I can't connect to an msaccess database (.accdb) with php code on a free website

I checked the pdo_odbc extension by and found it enabled. I resolved the file path by $_SERVER["DOCUMENT_ROOT"] and echoed the result, then I used the following code to connect: $db = new PDO("odbc:DRIVER={Microsoft Access…
lonecoder
  • 11
  • 4
0
votes
1 answer

Trouble installing composer for PHP 7 on windows to get PHPmailer

I want to add phpmail to my php Server. The server is a windows machine. I searched for it and found out that the best way to install it is with composer. I'm having trouble getting composer to install due to php.ini issues. I am getting the…
RCDAWebmaster
  • 319
  • 5
  • 17
0
votes
1 answer

Unable to resolve ORA-12154: TNS:could not resolve the connect identifier specified

I am not able to solve this error I am getting only from the Web Browser. I am trying to connect to a remote Oracle DB using PDO_ODBC in PHP. I think all is well configured, because when I try to connect using sqlplus or isql all is OK! When I try…
0
votes
1 answer

apache ignite fetches time as 1970-01-01 value from php pdo_odbc sql query

I have loaded data into ignite cache using php pdo_odbc driver sql query. If I query data using ignite rest api, I can see the all data fields correctly. Time field is displayed 10:20:00 which is correct. But when I select it from php, time field…
vishal
  • 3,993
  • 14
  • 59
  • 102
0
votes
1 answer

Loaded data from Java in to ignite and reading from php pdo_odb - "[unixODBC]Can not receive message header"

I have setup ignite and pdo_odbc. I am able to load data into ignite and everything is working from java. Ignite ignite = Ignition.start("examples/config/example-ignite.xml"); IgniteConfiguration iCfg = ignite.configuration(); …
vishal
  • 3,993
  • 14
  • 59
  • 102
1
2