I have downloaded strawberry PERL and writing one application with CGI Perl Apache on Winxp sp3).
One of the libraries (written by someone else) which I using uses XML::LibXML. When i load the page it gives Internal Server Error. From Apache error log i can see this error:
Can't load 'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XML::LibXML: load_file:The specified module could not be found at C:/strawberry/perl/lib/DynaLoader.pm line 190.
C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll exists with all permissions.
Also this library works properly on Linux. My application also works fine if I remove all code that needs LibXML.
Can anyone tell me when can be possible issue here.
If you peek into the source for DynaLoader you'll find
Many dynamic extension loading problems will appear to come from this section of code: XYZ failed at line 123 of DynaLoader.pm. Often these errors are actually occurring in the initialisation C code of the extension XS file. Perl reports the error as being in this perl code simply because this was the last perl code it executed.
You should have also gotten (but may not have noticed) the following dialog, which provides a more accurate error message:
The problem isn't that perl can't find LibXML.dll; it's that LibXML.dll can't find the real libxml. (The former is just a wrapper that provides Perl bindings for the latter.) To fix that you need to ensure that Strawberry Perl's c\bin
folder is in your PATH. In your case, that would be C:\strawberry\c\bin
.
You might have to check the environment variable settings in the windows, make sure that the installation path of the module is present in the PATH variable. The reason it works in linux is that make files usually set the environment variables for you in linux in windows it may not have set properly. For eg; go to Control Panel\System and Security\System click change settings then advanced tab in user variable section see if there is a variable called perl5lib. if not create an new perl5lib variable and add the path of your library ( usuall C:\Perl\site\lib but may be different in your case)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With