php - Ubuntu 10.04 zend-server and informix connection -
i have issue, php script connecting informix db. thought installing zend-server community edition , in addition pdo_informix extension. when run zend-server admin in browser, see pdo_informix extension marked "green". afterwards i've installed informix clientsdk 3.70 on ubuntu. i've set $informixdir environment variable /etc/profile , path variable bin directory. installation dir /opt/ibm/informix . when try write code in php
try{ $db = new pdo("informix:host=xx.xx.com;database=xxx;server=xxx_net; protocol=onsoctcp;", databaseuser, databasepassword); $db->setattribute(pdo::attr_errmode, pdo::errmode_exception); echo "test"; }catch (pdoexception $e){ echo "<br/>failed: ". $e->getmessage()."<br/>"; }
i've got following error in browser:
failed: sqlstate=hy000, sqldriverconnect: -23101 [informix] [informix odbc driver][informix]unspecified system error = -23101.
if i'm trying connect server studio on ubuntu informix db works well, guess using jdbc driver.
if go bin directory of informix clientsdk, there application called finderr. if finderr -23101 following output:
./finderr -23101 -23101 unable load locale categories.
so thought have set db_locale, client_locale environment variables... server using en_us.819 , client using en_us.utf8 .
being unable load locale categories means either informixdir not set software trying access informix locale data (which found in $informixdir/gls), or locale categories unspecified or mis-specified. these classically environment variables client_locale , db_locale, have values such 'en_us.8859-1' (the default) or 'es_es.utf8' (spanish in spain using utf-8).
i concentrate on ensuring browser has environment set correctly. may depend on how launch it.
there other environment variables used - dblang, lang, , lc_* set of names. however, unlikely needed if client_locale , db_locale set. said, i've found informix 4gl (i4gl), code written japanese characters in things table names not compile unless dblang set *locale variables. however, lc* , lang variables seemed have minimal no effect on result.
Comments
Post a Comment