php-src icon indicating copy to clipboard operation
php-src copied to clipboard

PDO_ODBC segfaults on "new \PDO"

Open yourpropertyexpert opened this issue 4 years ago • 2 comments

Description

The following code:

<?php
$dsn = "odbc:testodbc1";
$conn = new \PDO($dsn, "<myusername>", "<mycorrectpassword>");

Resulted in this output:

Nothing on screen, but the following appears in the log:
[core:notice] [pid 1] AH00052: child pid 27 exit signal Segmentation fault (11)

But I expected this output instead:

The code actually continuing to the next line :-)

Other info / debugging already done:

If I type the wrong password, I get an appropriate error thrown, telling me that I've entered the wrong password. The segfault is only thrown if I enter the correct authentication info.

I am using unixodbc as my driver manager, and have everything set up within there to the extent that if I run "isql -v testodbc1 " from the command line, I can log in and run commands on a SQL console. So I know the issue is somewhere between the ODBC and PHP.

The ODBC Driver is SnowflakeDSIIDriver.

phpinfo gives the following (in the various places):

PDO drivers | sqlite, odbc ODBCVER | 0x0380 ODBC Connection Pooling | Enabled, strict matching

PHP Version

PHP 8.1.2

Operating System

Debian GNU/Linux 11 (bullseye)

yourpropertyexpert avatar Feb 17 '22 20:02 yourpropertyexpert

Can you please post a backtrace of the segfault? You can find some instructions here.

damianwadley avatar Feb 17 '22 21:02 damianwadley

No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you.

github-actions[bot] avatar Mar 04 '22 00:03 github-actions[bot]