Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Validate HTML offline on LAMP Dev Server

Posted by petegraham (petegraham), 25 October 2005
I am looking for a way to validate the (X)HTML produced by a PHP script offline.

The site I am trying to validate is on a linux development server that currently has no Internet connection. Ideally I am looking for a PHP script (or possibly a linux application) that I can point at http://localhost/page_name.php which will tell me if it's valid or not.
I want to be able to set the validation check up as a cron job, therefore using a text editor to validate the embedded html in the source file isn't really an option.

I found this class http://validator.aborla.net/dev-zone.php5 but unfortunately it is written in PHP5, and all my servers run PHP4.

I have heard of HTML tidy but from research it doesn't appear to actually validate HTML.

I'm completely open to suggestions of how to achieve this. Thanks for your time,
Pete Graham

Posted by admin (Graham Ellis), 25 October 2005
Pete, as the servers are yours, it might not be a bad idea to load / upgrade one of them to PHP5 for the validation and run the code you've found and fancy, or even build a fresh release of Linux on an old PC you've got lying around.

Posted by petegraham (petegraham), 2 November 2005
I've managed to get my hands on an old pc so have installed FC4, which comes with PHP5 on that.

Annoyingly PHP5 comes with mySQL support dissabled (i suspect they're trying to get us all to use sqlite) so I am going to have to recompile PHP to get those scripts up and running.

The dissabling of mySQL support by default strikes me as somewhat annoying as a vast majority of pre-written PHP scripts/applications require connectivity to mySQL databases. What do other people think? Maybe I'm just lazy...

Posted by admin (Graham Ellis), 2 November 2005
It's a huge shame that MySQL drivers don't ship as standard with PHP5.  Case of the Open Source world shooting itself in the foot, I'm afraid ... all to do with licensing issues and the incompatible open source licenses used by the MySQL folks that meant that the PHP folks couldn't bundle ... an issue that was resolved but only AFTER the drivers had been pulled.

Posted by petegraham (petegraham), 3 November 2005
Hhhmm interesting, is there any chance of us seeing MySQL bundled with future versions of PHP?



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho