Informix connection works through Windows but not through Cygwin

Not sure where to go with this. I have a PHP script that calls a PERL script that connects to an Informix database. This setting works very well when I run the script on the windows cmd prompt, but when I try to run it via cron in cygwin it fails on

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

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

[Informix] [Informix ODBC Driver] [Informix] Unspecified system error = -23101. (SQL-HY000)

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

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

I'm using Windows PHP and PERL binaries in cygwin, so I'm not sure why it won't work as it would if I ran it through the cmd prompt. Does anyone know why this is?

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

+1


source to share


2 answers


Turns out cygwin didn't like the directory the client-sdk was in. After I reinstalled it in C: / IBM / Informix / Client-SDK everything started working. I'm not sure if the parentheses or spaces were the problem, but getting them out of the way seemed to do the trick.



+1


source


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



0


source







All Articles