php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8784 using Informix with PHP CGI
Submitted: 2001-01-18 11:02 UTC Modified: 2001-08-20 12:02 UTC
From: verrue dot jean-pierre at cimafap dot msa dot fr Assigned:
Status: Closed Package: Informix related
PHP Version: 4.0.4 OS: AIX 4.3.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: verrue dot jean-pierre at cimafap dot msa dot fr
New email:
PHP Version: OS:

 

 [2001-01-18 11:02 UTC] verrue dot jean-pierre at cimafap dot msa dot fr
It is not possible to use PHP cgi with NETSCAPE E.S. 3.51 and INFORMIX because it is imperatively necessary to have INFORMIXSERVER variable in the environment. Alas the environment of scripts cgi is very limited. To be able to use INFORMIX nevertheless, I supplemented the file php.ini by adding a parameter 'INFORMIX.default_server' then I modified the file ifx.ec in order to read this parameter and to place it in the environment Before calling upon 'ifx_connect'. Is it possible to register my modifiaction in a permanent way in PHP?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-14 11:14 UTC] kalowsky@php.net
create a patch file with your changes (diff -u <file name> > <patch name>)  and send it to the PHP mailing lists.

mind you will also want to place the patch here in the bug report, and give a good reason why, and sample script to reproduce the bug you are fixing.
 [2001-07-19 09:24 UTC] verrue dot jean-pierre at cimafap dot msa dot fr
the 'diff -u' output is :
-----------------------------------------------------------------------------------
--- ifx.ec      Thu Jul 19 10:34:25 2001
+++ ifx.ec.upd  Thu Jul 19 10:34:25 2001
@@ -351,6 +351,8 @@
     STD_PHP_INI_ENTRY_EX("ifx.max_links", "-1", PHP_INI_SYSTEM,
                        OnUpdateInt, max_links, php_ifx_globals, ifx_globals,
                       display_link_numbers)
+    STD_PHP_INI_ENTRY("ifx.default_server", NULL, PHP_INI_SYSTEM,
+                       OnUpdateString, default_server, php_ifx_globals, ifx_globals)
     STD_PHP_INI_ENTRY("ifx.default_host", NULL, PHP_INI_SYSTEM,
                        OnUpdateString, default_host, php_ifx_globals, ifx_globals)
     STD_PHP_INI_ENTRY("ifx.default_user", NULL, PHP_INI_SYSTEM,
@@ -517,9 +519,16 @@
 
     char *hashed_details;
     int hashed_details_length;
+
+    static char server[40] ;
+
     IFXLS_FETCH();
     PLS_FETCH();
 
+    sprintf(server, "INFORMIXSERVER=%s", IFXG(default_server)) ;
+    putenv(server);
+       syslog(LOG_DEBUG, "php:%s", server) ;
+
     if (PG(sql_safe_mode)) {
         if (ZEND_NUM_ARGS()>0) {
             php_error(E_NOTICE,
------------------------------------------------------------------------------------

 [2001-07-31 21:29 UTC] sniper@php.net
Just wondering..if you set INFORMIXSERVER prior to starting
the webserver, doesn't the webserver inherit the environment?? How are you running PHP? As a NSAPI module
or CGI ? FYI:I just recently committed a huge patch for 
Informix to make it compile and work in threaded
environment. 

--Jani

 [2001-08-20 12:02 UTC] sniper@php.net
No feedback. Reopen if you still have this problem
with PHP 4.0.7 (soon to be released) or with latest CVS 
snapshot from http://snaps.php.net/

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 09:01:29 2024 UTC