Apache error: Access Informix Database throught ODBC using Perl (Windows)
I was getting this error:
[Mon Jul 20 12:32:05 2009] [error] [client 192.168.241.233] Premature end of script headers: elite_inventory.pl
[Mon Jul 20 12:32:05 2009] [error] [client 192.168.241.233] DBI connect('my_database','my_user',...) failed: [INTERSOLV][ODBC Informix driver][Informix]Unable to load locale categories. (SQL-HY000) at C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/script.pl line 37
The fix involved modifying Apache’s environment variables using SetEnv in httpd.conf:
SetEnv INFORMIXDIR "C:/informix32"
SetEnv INFORMIXSERVER "isaac_net"
SetEnv DELIMIDENT n
SetEnv DBANSIWARN n
SetEnv CLIENT_LOCAL "en_US.CP1252"
SetEnv DB_LOCAL "en_US.CP1252"
This is because even if the variables are set in the registries in Windows (they are environment variables in Linux), the web server doesn’t use them.
Reference #1 and Reference #2.
You might need to use a different locale under Linux or Unix.
You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.