I can run the script from a command window, and it functions correctly, displaying the HTML tags, DB2 data, and perlinfo data.
But, when I run the same script via a browser going to the web server I get the following error message:
- Code: Select all
Error message:
install_driver(DB2) failed: Can't load 'C:/xampp/perl/site/lib//auto/DBD/DB2/DB2.dll' for module DBD::DB2: load_file:The specified module could not be found at C:/xampp/perl/lib/DynaLoader.pm line 200. at (eval 58) line 3 Compilation failed in require at (eval 58) line 3. Perhaps a required shared library or dll isn't installed where expected at C:/xampp/htdocs/xampp/perl-db2.pl line 10 ,
The DB2.dll file is installed exactly where is says it can't load it from. I did observe that when I dumped the CGI environment, the PATH is truncated from what it is supposed to be, and the missing part is all the DB2 directories, but other than that nothing in the missing part seems relevant. The full path is:
- Code: Select all
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;
c:\program files\ibm\infoprint select;c:\notes;c:\program files\xlview;
c:\lotus\compnent;c:\utilities;c:\program files\common files\lenovo;
c:\program files\ibm\personal communications\;c:\program files\ibm\trace facility\;
c:\program files\common files\roxio shared\dllshared\;
c:\program files\common files\roxio shared\10.0\dllshared\;
c:\program files\ibm\gsk8\lib;C:\PROGRA~1\IBM\SQLLIB\BIN;
C:\PROGRA~1\IBM\SQLLIB\FUNCTION;
C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL
And the CGI environment version is truncated:
- Code: Select all
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;
C:\Program Files\IBM\Infoprint Select;C:\Notes;C:\Program Files\XLView;
C:\lotus\compnent;C:\Utilities;C:\Program Files\Common Files\Lenovo;
C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facility\;
C:\Program Files\Common Files\Roxio Shared\DLLShared\;
C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\
Remember, the DB2 module is installed in Perl and working correctly when the same script is run from a cmd prompt.
I've searched around, of course, but have not found any suggestions that worked, or even were a good match to my situation. XAMPP / Perl and DB2 is not a very common combination.
Any suggestions?