tsrplatelayer has asked for the wisdom of the Perl Monks concerning the following question:

I have many years programming experience, but am new to Perl. I have installed Perl on Windows XP Pro with IIS and have a 'hello world' program working. I am trying to set up the W3C Validator. When I click the link that launches 'check.pl' I get the error:-
Can't load 'D:/perl/site/lib/auto/SGML/Parser/OpenSP/OpenSP.dll' for m +odule SGML::Parser::OpenSP: load_file:The specified module could not +be found at D:/perl/site/lib/XSLoader.pm line 66. at D:/perl/site/li +b/SGML/Parser/OpenSP.pm line 18
This is mid-way through the initial set of 'use' lines
use CGI 2.81 qw(-newstyle_urls -private_tempfiles red +irect); use CGI::Carp qw(carp croak fatalsToBrowser); use Config::General 2.19 qw(); # Need 2.19 for -AutoLaunder use Encode qw(); use Encode::Alias qw(); use Encode::HanExtra qw(); # for some chinese character encod +ings, # e.g gb18030 # use Encode::JIS2K qw(); # ditto extra japanese encodings use File::Spec qw(); use HTML::Encoding 0.52 qw(); use HTML::Parser 3.25 qw(); # Need 3.25 for $p->ignore_element +s. use HTML::Template 2.6 qw(); use HTTP::Negotiate qw(); use HTTP::Request qw(); use HTTP::Headers::Auth qw(); # Needs to be imported after other + HTTP::*. use SGML::Parser::OpenSP qw(); use URI qw(); use URI::Escape qw(uri_escape); use XML::LibXML qw();
OpenSP.dll exists in the path as given - so why doesnt it load? I changed XSLoader.pm to have 2 additonal print lines
print "Loading XSLoader::load for $module ($file)<br>\n"; my $libref = dl_load_file($file, 0) or do { require Carp; Carp::croak("Can't load '$file' for module $module: " . dl_err +or()); }; print "Loaded XSLoader::load for $module ($file)<br>\n";
All the 'use' commands prior to use SGML::Parser::OpenSP show both the 'Loading' and 'Loaded' messages from the print statements. However when this 'use' statement is processed the 'Loading' message is displayed but not the 'Loaded' message - instead the error is generated I am pulling my hair out and shortly will be a 'tonsured monk' Advice greatly appreciated.

Replies are listed 'Best First'.
Re: Struggling to solve OpenSP failure
by tsrplatelayer (Initiate) on Sep 24, 2007 at 21:17 UTC
    I have done a bit more checking and I can add, and this seems strange to me, this oocurs when check.pl is served by IIS. If I go to the server and run perl from a command prompt:-
    D:\perl\bin> perl D:\wwwroot\validator\httpd\cgi-bin\check.pl
    then no error is generated - instead html code is spooled to the screen which does not contain the error message!!!
      Sounds like a file permissions problem. IIS isn't running as you, so it may not have execute priviledges on the files.

      ...roboticus

        Thanks - but I already thought of that so I have checked and changed the security properties in d:\perl - and all subfolders - and have set 'full access' to all of the users listed - including everyone and - because this is only a test server - I have also done the same on d:\wwwroot and all subfolders. I have used IIS manager to set Script Source Access, Read and Write permissions on all web sites Execute permissions are set to 'Scripts and Executables' on all web sites It still fails!!!!