Bug #8784 Updated: using Informix with PHP CGI

From: Date: Thu, 19 Jul 2001 13:24:47 +0000
Subject: Bug #8784 Updated: using Informix with PHP CGI
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-60292@lists.php.net to get a copy of this message
ID: 8784 User updated by: verrue.jean-pierre@cimafap.msa.fr Reported By: verrue.jean-pierre@cimafap.msa.fr Status: Feedback Bug Type: Informix related Operating System: AIX 4.3.2 PHP Version: 4.0.4 New Comment: 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, ------------------------------------------------------------------------------------ Previous Comments: ------------------------------------------------------------------------ [2001-06-14 11:14:43] 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-01-18 11:02:37] verrue.jean-pierre@cimafap.msa.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? ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=8784&edit=1

« previous php.dev (#60292) next »