php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2953 ininformix database connection does not work
Submitted: 1999-12-10 12:48 UTC Modified: 1999-12-14 15:47 UTC
From: judah at pagetalk dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Beta 3 OS: solaris 2.5.1
Private report: No CVE-ID: None
 [1999-12-10 12:48 UTC] judah at pagetalk dot com
I cant seem to get php built as an apache module (the latest version as of 12/10/99)to connect to my database. There was no errors when I compiled apache and php

 I get the following error;

failed to open Resource id #1 
W [SQLSTATE=01 I04 SQLCODE=0]

This is an example script
This is a test of a db connect<P>
<?
$connection_id = ifx_pconnect("INFORMIXSERVER"informix", "INFORMIXPASSWORD");
if (is_integer($connection_id)) {
        echo "Good connection $connection_id<br>";
        }
else {
        echo "failed to open $connection_id <br>";
        echo ifx_error();
        echo "<br>";
        echo ifx_errormsg();
        echo "<br>";
        die;
}
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-10 15:30 UTC] danny at cvs dot php dot net
As far as I can see, your connection *does* work.

From the Informix  ESQL/C manual :

W = "Warning" (NOT Error !)
SQLSTATE 01 I04 : "database selected"
SQLCODE = 0 : "success"

This seems pretty good to me.

But why the test "is_integer" ? The connection id is a resource, not an integer.

Please try : 

if (! $connection_id) {
}

Danny
---
 [1999-12-14 15:47 UTC] danny at cvs dot php dot net
No reaction. Closing.

Danny
---
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 21:00:02 2026 UTC