php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36135 How to get PHP working in thread mode with informix libraries ?
Submitted: 2006-01-23 12:00 UTC Modified: 2006-01-23 15:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: daniel dot henchoz at unil dot ch Assigned:
Status: Wont fix Package: Informix related
PHP Version: 5.1.2 OS: Solaris 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daniel dot henchoz at unil dot ch
New email:
PHP Version: OS:

 

 [2006-01-23 12:00 UTC] daniel dot henchoz at unil dot ch
Description:
------------
I've installed a SUN server under Solaris 9 with Apache 2.0.55, PHP 5.1.2, Informix 9.40.UC6, Informix Client SDK 2.90.UC3, Informix Webdatablade 4.13.UC3. Now I try to get information from the Informix database via a PHP ifx_connect function and on the same apache server using the Informix webdatablade tool (old pages not yet migrated ...).

The php and informix modules are loaded in the apache httpd.conf :

#IBM Informix Web DataBlade DSO Module Added
LoadModule        informix_module       
/d3/apache2/wwwdbdev/ifmx-bin/drvapch2.so

# Load the necessary PHP modules
LoadModule php5_module        modules/libphp5.so

I'm not able to have php and webdatablade connections to informix work together ...


Case 1:
-------

If I load the informix module first in the httpd.conf file the php ifx functions doesn't work and I get the following incomplete error message :

*Warning*: ifx_connect() [function.ifx-connect 
<https://furio.unil.ch/php-dhz/function.ifx-connect>]: E [SQLSTATE= in 
*/d3/apache2/wwwdbdev/php-dhz/testifmx.php* on line *3*

*Warning*: ifx_query(): supplied argument is not a valid Informix link resource in */d3/apache2/wwwdbdev/php-dhz/testifmx.php* on line *4*

*Warning*: printf() [function.printf 
<https://furio.unil.ch/php-dhz/function.printf>]: Too few arguments in */d3/apache2/wwwdbdev/php-dhz/testifmx.php* on line *7*

The php script is below :

<?php

$ConnId = ifx_connect ("aaaa@bbbbb","xxxxxx","xxxxxx");
$ResId = ifx_query ("SELECT * FROM dhtable", $ConnId);

if (! $ResId) {
    printf("Can't select names : %s\n<br />%s<br />\n", ifx_error());
    ifx_errormsg();
    die;
}
ifx_htmltbl_result($ResId, "border=\"1\"");
ifx_free_result($ResId);

ifx_close($ConnId);
?>

On the other hand the webdatablade connection works normally ...


Case 2:
-------

If I load the php module before the informix module in the httpd.conf file, the php ifx_connect function works correctly, but now the wedatablade connection fails (never answer) ....



I need the two ways to connect to the database, since we actually still use both .... I've asked IBM for a solution, but they propose me to submit this problem to PHP people since IBM didn't develop the ifx functions to connect to the informix database via PHP.

The IBM engineer already did some test, and suspect that we have problems because the php informix module doesn't use the informix thread libs, since the webdatablade module of informix use them ... (I could formward the complete tests and example if necessary). He propose me to submit a question to the PHP community.

So my final question is :
How to get PHP working in thread mode with the informix libraries ?? 

Best Regards

Daniel





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-23 12:05 UTC] daniel dot henchoz at unil dot ch
I built PHP with the following command :

#  ./configure --with-informix=/ifmxbin --with-gd --with-zlib --with-mcrypt --with-apxs2=/usr/local/apache2/bin/apxs --with-xml --with-libxml-dir=/usr/local --with-xsl=/usr/local
 [2006-01-23 13:21 UTC] sniper@php.net
IBM needs to get their act together and provide us real support. Before that happens -> wont fix. (tell this to IBM, maybe they'll actually help if a customer makes a request)
 [2006-01-23 15:00 UTC] daniel dot henchoz at unil dot ch
Ok, below you can read the postion of IBM :

-----------------------------------------------------------
Hi.

I dont understand that statement.

We're providing actual support, as i told you in my previous email, we believe that the problem is due that PHP is compiled using non thread libraries, and the webblade is done using thread ones.
PHP develop the module to comunicate with informix, so is up to them to give the option of create the module with thread libraries (which is the best option) to make it compatible with other modules
which comunicate with informix.

If they (i mean PHP) need help to develop the module, they should open a case with IBM Informix support providing a correct ICN number, but is not up to us to develop the module for them.

As i show you in the sample code,a simple module that connect using thread libraries will break the php module, so really, they should came with a way to be able to complie using the thread libraries,
for what i saw in the make files, there is such thing which will activate the "-thread" flag for the esql, but maybe is still "experimental", PHP support should know this, or at least help you to compile the module
with threads.

I hope is clear now, i told you in my first email that this looked like a third party sfotware problem, some kind of incompatiblily between the libraries used by the PHP module and used by the webdriver one.
and i think i 've prove that,

Did they knew that the problem is related to the thread / non-thread libraries before they replied to you? becouse if not, i think they will change their statement.

Regards,

J.S.

-----------------------------------------------------------

What can I do now ?

Regards

Daniel
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 13:01:28 2019 UTC