|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-11-23 08:56 UTC] kevin dot lentle at swift-computing dot com
Description:
------------
When attempting to access a database we get an exception thrown in informix_statement...
SQLSTATE[22001]: String data, right truncated: -11023 [Informix][Informix ODBC Driver]String data right truncation. (SQLExecute[-11023] at ..\pecl_5_2\pdo_informix\informix_statement.c:725)
This seems to be due to memory problems as shown in the test script below. If the 15th line ($thing = "fails") is commented out the script works. If the line is uncommented it fails with the above exception. Note that testtab contains three fields (field1, field2, field3) defined as char(10).
Client: Windows XP, Informix CSDK 2.90.TC6
Server: SCO OpenServer 5.0.5, Informix SE 7.25.UC6
Reproduce code:
---------------
<?php
try {
$dsn = "informix:database=/databases1/scv9/scv9;server=scv9;CursorBehavior=1";
$connArray = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_CASE => PDO::CASE_LOWER,
PDO::ATTR_PERSISTENT => true
);
$dbConn = new PDO($dsn, "swift", "swift99", $connArray);
$query1 = "select * from testtab where field1 = ?";
$state = $dbConn->prepare($query1);
$state->execute(array("A"));
$thing = "fails";
}
catch (PDOException $e) {
var_dump($e);
}
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
hi, i'm working on a project in whitch ihave to make the connexion to an informix database unsing aPHP server (wamp). the machine i'm working in can connect using an Informix-CLIfor windows(32 bit) version 2.50.TD2. i have already tryed to load ifx extension. it seems to work but when i check using "extension_loaded('ifx')" commande it returns false and there's noconnexion. Please, i'm asking for help.hey, to make it fast here's my problem:i i wanna connect to an informix database server so this is my code : <?php $con=ifx_connect('hgh','hgh','iooi'); ..... ?> and all what i get is this warning : Warning: ifx_connect() [function.ifx-connect]: E [SQLSTATE=IX 001 SQLCODE=-1829] in C:\wamp\www\ifx\ifx.php on line .. can some one tell me where is the mistake and how to make it work? Please Help !! Thx