We're moving our old Perl/CGI application to a new system internally and ran into a snag. When I run:
perl -MXML::Parser -e 1
From the command line, all is well. However, when I run it from a CGI script as
use XML::Parser, all hell breaks lose:
Can't load 'C:/strawberry/perl/site/lib/auto/XML/Parser/Expat/Expat.dll' for module XML::Parser::Expat: load_file:The specified module could not be found at C:/strawberry/perl/lib/DynaLoader.pm line 200, line 55. at C:/strawberry/perl/site/lib/XML/Parser.pm line 18 Compilation failed in require at C:/strawberry/perl/site/lib/XML/Parser.pm line 18, line 55. BEGIN failed--compilation aborted at C:/strawberry/perl/site/lib/XML/Parser.pm line 22, line 55. Compilation failed in require at (eval 43) line 1, line 55. BEGIN failed--compilation aborted at (eval 43) line 1, line 55.
Other modules added onto the perl installation work fine (MD5, WIn32::ODBC, etc...) but this Expat one snarls.
The server is IIS 7 (new to us for this app), x64 Win2008 (also, new to us).
After futzing around with this for a while, this isn't the only module that fails to load. XML::Simple does as well. Almost the same error. The DLL's that Perl is claiming do not exist, exist just fine. And things work from the command line as well.