in reply to Accessing parallel ports

You ask a question about parallel ports but show code that is mostly CGI oriented. Why is that? What are you actually trying to do and what is actually failing?

It may help to focus on one problem at a time!

True laziness is hard work