Environment variable %s too long error
Posted in 2012
Topics: Security, Permissions & Auditing
Hi I am trying to connect to Informix version 7.2.3 using a PHP client and I am getting following error back Environment variable %s too long error. The database name and user name /password are correct as if I change specify a wrong database name it does give the appropriate error. We have INFORMIXDATABASE name env variable is less than 18 character. Any help will be appreciated.
On Sat, Sep 15, 2012 at 7:26 AM, SAJITHKUMAR KIZHAKKINIYIL < sajithkumark@gmail.com> wrote: > I am trying to connect to Informix version 7.2.3 using a PHP client and I > am > getting following error back Environment variable %s too long error. > Are you sure about the Informix version? Do you realize that IDS 7.23 is supposed to be dead very dead. It is not even guaranteed to be Y2K-safe; the Y2K-safe version was 7.24. If the version of Informix is mis-reported, please identify it again accurately. Which version of which o/s is Informix running on? Which version of which client API are you using in PHP (ESQL/C, ODBC, CCC, something else)? Which version of PHP are you using? Which PHP module are you using to connect to Informix? If the PHP is not on the same machine as Informix, which version of which o/s is it running on? > The database name and user name /password are correct as if I change > specify a > wrong database name it does give the appropriate error. > > We have INFORMIXDATABASE name env variable is less than 18 character. > INFORMIXDATABASE is not a standard Informix environment variable; it is not the source of your problem. You may end up having to do a dump of the environment variables that PHP has; it is going to be hard to guess which one you've got set to too long a value. Is PATH set to an unusually long value? I'm not convinced that'd be the problem, but it is a little puzzling that any 7.23 code is checking and complaining. I assume INFORMIXDIR is comfortably under 255 characters or you'd be getting other problems. -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." --f46d04016977aa34fb04c9c0fc15
Thanks Jonthan Here are the information OS: AIX 6.1 Informix : informix-se 7.25 (32bit) SDK: 3.7 (32 bit) PHP : PHP 5.3.11 pdo_informix : pdo_informix-1.2.6 (pdo_informix.so) Which version of which o/s is Informix running on? Ans: OS: AIX 6.1 Which version of which client API are you using in PHP (ESQL/C, ODBC, CCC, something else)? Ans: pdo_informix, ODBC (unixodbc2.3) Which version of PHP are you using? Ans: PHP 5.3.11 Which PHP module are you using to connect to Informix? Ans: We are tried with pdo_informix, and unixodbc2.3 If the PHP is not on the same machine as Informix, which version of which o/s is it running on? Ans : both are running in the same machine.. Here is the code snippet $uname = "informix"; $password = "test"; $conn_string = "informix:host=xyz;service=1525;database=testDB;server=testserver;protocol=onsoc tcp;"; $conn = new PDO($conn_string, $uname, $password);