#17047 [Opn->Fbk]: INFORMIXSERVER not being read
| From: | iliaa@php.net | Date: | Fri, 11 Oct 2002 03:55:32 +0000 |
| Subject: | #17047 [Opn->Fbk]: INFORMIXSERVER not being read | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22132@lists.php.net to get a copy of this message | ||
ID: 17047
Updated by: iliaa@php.net
Reported By: pedietz@west.com
-Status: Open
+Status: Feedback
Bug Type: Informix related
Operating System: aix 4.3.3
PHP Version: 4.2.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2002-05-06 14:13:03] pedietz@west.com
Also of note,
I have register_global = On.
phpinfo() shows:
register_global = On and On
INFORMIXSERVER = ibm65
ifx.default_host = ibm65
Yet it still requires me to do this:
putenv("INFORMIXSERVER=ibm65");
------------------------------------------------------------------------
[2002-05-06 13:41:08] pedietz@west.com
The following php script does not work....
<?php
// print the value of my INFORMIXSERVER variable
echo getenv("INFORMIXSERVER");
$conn_id = ifx_connect ("db@ibm65");
?>
it prints:
ibm65
Warning: ifx_connect: E [SQLSTATE=IX 000 SQLCODE=-25560] in test.php on
line 14
25560 means that INFORMIXSERVER is not set in the env.
Which is crazy because I getenv it and echo it.
But the following works:
<?php
putenv("INFORMIXSERVER=ibm65");
$conn_id = ifx_connect ("db@ibm65");
?>
So it seems that the environment variable INFORMIXSERVER is not being
read correctly.
Besides having INFORMIXSERVER set in my env, I also have set the
/usr/local/lib/php.ini ifx.default_host=ibm65. Yet neither work.
I have to putenv() the value explicitly.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17047&edit=1