|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-02-11 08:59 UTC] gary dot doades at webroster dot net
Description:
------------
Certain pdo_odbc code completely crashes PHP engine (CGI/FastCGI)
This only happens if I use UID= & PWD = as part of the DSN AND I use parameters in the query. If I don't use parameters in the query it works OK.
Reproduce code:
---------------
$cn = new PDO('odbc:DSN=WEBROSTER000;UID=user1.drb2171;PWD=user1');
$dr = $cn->prepare('select * from vclient where client_id = :id order by sname,fname');
$dr->execute(array(':id' => '1234'));
$row = $dr->fetch(PDO_FETCH_ASSOC);
Expected result:
----------------
Some data in the $row variable!
Actual result:
--------------
Being windows you get a "this program has had to close, do you want to send information to Microsoft" dialog.
AppName: php-cgi.exe AppVer: 5.1.0.0 ModName: php_pdo.dll
ModVer: 5.1.0.0 Offset: 000019a5
Exception code is: 5
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
This works: $cn = new PDO('odbc:WEBROSTER001','user1.drb2171','user1'); $dr = $cn->prepare('select * from vclient where client_id = 1234 order by sname,fname'); $dr->execute(); $row = $dr->fetch(PDO_FETCH_ASSOC); This crashes: $cn = new PDO('odbc:WEBROSTER001','user1.drb2171','user1'); $dr = $cn->prepare('select * from vclient where client_id = :id order by sname,fname'); $dr->execute(array(':id' => 1234)); $row = $dr->fetch(PDO_FETCH_ASSOC);Can you try this: $cn = new PDO('odbc:WEBROSTER001','user1.drb2171','user1'); $dr = $cn->prepare('select * from vclient where client_id = ? order by sname,fname'); $dr->execute(array(1234)); $row = $dr->fetch(PDO_FETCH_ASSOC);