1
votes

Not really sure where to go with this one. I have a PHP script that invokes a PERL script that connects to an Informix database. This setup works just fine when I run the script to the Windows cmd prompt, but when I attempt to run it through cron in cygwin it fails on

[Informix][Informix ODBC Driver]Unable to load translation shared library (DLL). (SQL-IM009)

I have tried adding the Informix bin directory (/cygdrive/c/Program\ Files\ (x86)/IBM/Informix/Client-SDK/bin) to the PATH variable in the crontab file but there were no changes. I also tried adding that same directory to the INFORMIXDIR variable in the crontab file, but then I got the following error message

[Informix][Informix ODBC Driver][Informix]Unspecified System Error = -23101. (SQL-HY000)

If I look that error in finderr.exe (supplied by the driver) I see that it means that it is Unable to load locale categories or my INFORMIXDIR is incorrect, but I am not sure how to set the CLIENT_LOCALE or DB_LOCALE.

Then I think I fixed this by using the correct directory separators and I dropped the bin subdirectory for the INFORMIXDIR variable in crontab, because I got the SQL-IM009 error again.

I am using the Windows PHP and PERL executables in cygwin, so I am not really sure why it wouldn't work as it does if I run it through the cmd prompt. Would anybody know why this is?

I am running this on a Windows Server 2008 R2 cloud instance, and I am attempting to copy a working setup that so that we can move it to an offsite location.

2

2 Answers

1
votes

It turns out that cygwin didn't like the directory that the Client-SDK was in. Once I reinstalled it to C:/IBM/Informix/Client-SDK everything started working. I am not sure if the problem was the parentheses or the spaces, but getting them out of the path seemed to do the trick.

0
votes

Looks more like a problem with using a combo of backslashes and slashes in your PATH environment. Slashes for *nix, backslashes for WIN and DOS. CLIENT, DBLOCALE, DBDATE, etc. can be set in your servernane.cmd file in WIN/DOS and in .profile, .cshrc, .login, etc. depending on the *nix shell you're using. You can install the Informix binaries and other supporting files in any directory you like, as long as INFORMIXDIR environment points to the installed directory. I have 11.70.FC6 installed in C:\INFORMIX and my dbspaces in C:\DBSPACES.