::[ Empty Spaces ]::

Wandering through, a journey within.


Installing the W3C HTML validator on OS X

Apple’s Developer Connection site has published a step by step guide on installing the W3C HTML validator on OS X. Overall, the process went smoothly, from downloading the validator itself to installing the necessary Perl modules. Configuring CPAN was a bit of a pain, at first it didn’t recognise out copy of Lynks (explicitely telling it the path /usr/local/bin/lynx fixed that), and it didn’t manage to download one file (ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY). We went to fetch the file with wget and placed it in the appropriate location. Some more problems occurred when installing the HTTP:Request module. This got solved by following the instructions in this post, thanks to a helpful note posted on the Apple web Development list.

The last Perl module (Text::Iconv) caused us some headaches, we copy pasted the instructions from Apple’s article, and something went wrong causing the ‘make test’ to fail. Stepping backwards, pasting the command in a text editor first fixed that problem. At last, the HTML validator was running … and returned a 403 (access denied) error. A trip around our error logs showed the problem. We modified our httpd.conf file as follows, and everything went fine (this problem might be specific to our Apache configuration file):

<Directory /Library/WebServer/Documents/validator/htdocs>
  Options              ExecCGI IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch FollowSymLinks
  AllowOverride        All
  AddHandler           server-parsed .html
  AddCharset           utf-8         .html

</Directory>

Lastly, a message on the W3C validator mailing list pointed out that the version of the validator in Apples article was a bit rusty (ahem). We thus ‘upgraded’ our copy to the official release (instructions), replacing the Apple provide instructions by this line:

bash$ <kbd>cvs get -r validator-0_6_7-release validator</kbd>

This article is pretty outdated