php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57587 Thanks for the help.
Submitted: 2007-03-23 12:04 UTC Modified: 2007-03-27 08:06 UTC
From: tom at advancedatatools dot com Assigned:
Status: Closed Package: PDO_INFORMIX (PECL)
PHP Version: 5.2.1 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 + 14 = ?
Subscribe to this entry?

 
 [2007-03-23 12:04 UTC] tom at advancedatatools dot com
Description:
------------
When compiling 1.1.0 on unix [linux or solaris] everything functions properly. However when I compile the same set of code including the pdo_informix driver on windows bindParam segfaults.

I have tested this from the command line and it returns the same error. The same code runs under linux fine. 

I compiled the driver with vc++ 6, and all other functionality of the driver works fine.

Reproduce code:
---------------
$sqlline = "select contributor_name from contributors where contributor_id = ?";
$sth = $dbh->prepare($sqlline);
$line = 7;
$sth->bindParam(1,$line);
$sth->execute();
while ($row = $sth->fetch(PDO::FETCH_NUM))
	print_r($row);

Expected result:
----------------
The users name

Actual result:
--------------
Nothing if run from the command line, CGI Header error if run from IIS

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-23 13:28 UTC] kfbombar at us dot ibm dot com
I have compiled (Visual Studio 6) pdo_informix on Windows and have run the following script:

<?php

$conn = new PDO("informix:DSN=myDSN", "user", "***");

$sql = "DROP TABLE test";
$stmt = $conn->exec($sql);
$sql = "CREATE TABLE test (id INTEGER, data VARCHAR(50))";
$stmt = $conn->exec($sql);
$sql = "INSERT INTO test (id, data) VALUES (1, 'Kellen')";
$stmt = $conn->exec($sql);
$sql = "SELECT data FROM test WHERE id = ?";
$sth = $conn->prepare($sql);
$line = 1;
$sth->bindParam(1, $line);
$sth->execute();
while ($row = $sth->fetch(PDO::FETCH_NUM)) {
	print_r($row);
}

?>

I am seeing no problems with this script.  I tried to base it off of your original script.  Can you please modify this script and let us know the changes in order to reproduce the defect?
 [2007-03-23 13:37 UTC] tom at advancedatatools dot com
I created the file, under windows it returns [in IIS]
CGI Error
or if run from the command line it just drops back to the command prompt with no returns.

On Unix:
Array
(
    [0] => Kellen
)


Could there be something with my windows dev system that is preventing it from properly compiling? I would assume in that case the dll would not function at all.
 [2007-03-23 14:11 UTC] kfbombar at us dot ibm dot com
Please copy the exact script that I provided in the previous mail, change the connection information appropriately and run the script via the command line.  Paste the output, and the script, from the command line in here.  

This does not appear to be an issue with the pdo_informix code but that of a setup/compile issue.
 [2007-03-23 14:27 UTC] tom at advancedatatools dot com
Let me try recompiling the DLL file and see if that makes any difference. Would you be able to paste the windows build command that you used?
 [2007-03-23 14:33 UTC] kfbombar at us dot ibm dot com
I used the following...but you may need different options:

cscript /nologo configure.js --disable-cgi --enable-cli --with-xml --enable-zlib --without-libxml --without-pdo-sqlite --without-iconv --without-sqlite --enable-pdo --without-gd --with-pdo-informix="C:\Informix",shared
 [2007-03-26 20:03 UTC] kfbombar at us dot ibm dot com
Please provide feedback on this issue.  We will close if there is no response assuming that all has been resolved.
 [2007-03-27 08:06 UTC] tom at advancedatatools dot com
Thanks for the help, I am still trying to track down the problem but it looks like for some reason the production system is using an old dll file instead of 1.1.0 which is in the php/ext directory. [Which is something on my end, not something that is a pecl bug]
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 00:01:30 2024 UTC