logo der blechtrottel brodaktschns  blechtrottel brodaktschns
deutsch

W3C Validator offline

Installation

  1. Installing the msi version of Apache2 was not really difficult. Strangely enough though, this server offers [...]\Apache Group\Apache2 as the standard installation path. If you install Windows ports of Linux applications it is a good idea not to use folder names containing spaces. We therefore chose our path to be C:\Web\Apache2.
  2. ActivePerl is also available as an easy-to-install msi file. We recommend letting the installer include the path to perl.exe into the PATH environment variable. It will make adapting and testing Perl scripts easier. The downloaded package lacks a few modules that are needed by the Perl script of the validator. We will come back to that later. Our installation ended up in C:\Web\Perl.
  3. The SGML parser's osp152.dll only needs unzipping into the path. We chose C:\Web\Perl\bin.
  4. Both the W3C validator and its DTD's can be downloaded as tar.gz files. Our validator was extracted into C:\Web\Apache2\validator

Fine Tuning

  1. The httpd.conf in the conf folder of Apache2 has to be adapted to your local installation. We will only touch the lines concerning the validator here. (Hint: your server must support CGI and SSI). The example under httpd/conf/httpd.conf can be copied almost identically. These are our settings:

    the adapted http.conf
    Of course, there is a listing to copy and paste the settings from.
  2. ActivePerl has to be updated with a few modules by using its package manager ppm. Before you do so you should rename the Perl script in validator\httpd\cgi-bin from check (without file extension) into check.pl and change the first line (Shebang) of the script into
    #!C:/Web/Perl/bin/perl -w
    After that you can call the script in a DOS box by typing (including our example path)
    perl C:\Web\Apache2\validator\httpd\cgi-bin\check.pl
    The script gets as far as to the first missing module and produces an error message including the module's name. This can now be installed via ppm. (In ActivePerl's help you will find good instructions on how to use ppm) Having installed the module you can call the script anew, get to the next error message, aso. Since we have already done so you can alternatively simply search for the following modules: CGI, Config-General, HTML-Encoding, HTML-Template, Net-IP, SGML-Parser-OpenSP, Temp-File, Encode-HanExtra.
    Some modules are not available from the servers of ActiveState. In these cases we recommend the repository of the University of Winnipeg (http://theoryx5.uwinnipeg.ca/ppms) or the following address: http://trouchelle.com/ppm/package.xml. Via ppm, the SGML-Parser-OpenSP package can only be obtained in a very old version. A working version can be found at http://www.myhpi.de/~dtibbe/download/ppm.zip. In this package you will also find most of the extensions mentioned above for local installation.
  3. Last but not least let us deal with the validator itself. In htdocs\config there is a file called validator.conf, in which the Base for all other paths has to be given in line 24. Note: You have to use forward slashes in the paths
    Base = C:/Web/Apache2/validator
    If you want to test files from local IP-addresses in your network check line 51:
    Allow Private IPs = yes
    As of version 0.8.0 of the validator the check.pl script has become quite simple to install. It needs the path to the configuration file in line 105:
    -ConfigFile => ('C:/Web/Apache2/validator/htdocs/config/validator.conf'),
    Interestingly enough version 0.8.3 also needs help in line 119:
    Base => ($ENV{W3C_VALIDATOR_HOME} || 'C:/Web/Apache2/validator'),
    And in lines 627 and 634 there is a little glitch:
    if (($File->{ContentType} == "text/html")
    should read:
    if (($File->{ContentType} eq "text/html")

nextPart1 - Part2 - Part3

 home  up one level  to the top 12/1/2008