in reply to DBI connect('my_dsn','user',...) failed: [INTERSOLV][ODBC Informix driver][Informix]Unable to load locale categories. (SQL-HY000)

Is the INFORMIXDIR environment variable set, and are the files readable by the web user (the user that the script executes under from the web)?
  • Comment on Re: DBI connect('my_dsn','user',...) failed: [INTERSOLV][ODBC Informix driver][Informix]Unable to load locale categories. (SQL-HY000)

Replies are listed 'Best First'.
Re^2: DBI connect('my_dsn','user',...) failed: [INTERSOLV][ODBC Informix driver][Informix]Unable to load locale categories. (SQL-HY000)
by albi (Initiate) on Jul 20, 2009 at 11:53 UTC
    yes, the file is readable by the web user (same as every other script that works) and yes the INFORMIXDIR is set (On Windows platforms, INFORMIXDIR is a registry setting rather than an environment variable.)

      I found the solution: while INFORMIXDIR was set in the registries, it also needed to be set in Apache's environment variables, along with a few others.

      I added the followings to httpd.conf:

      #INFORMIX SetEnv INFORMIXDIR "C:/informix32" SetEnv INFORMIXSERVER "server" SetEnv DELIMIDENT n SetEnv DBANSIWARN n SetEnv CLIENT_LOCAL "en_US.CP1252" SetEnv DB_LOCAL "en_US.CP1252"
      and then restarted Apache.