Show a PDF files in users browser via PHP/Perl

I assume you want the PDF to display in the browser, rather than forcing a download. If that is the case, try setting the Content-Disposition header with a value of inline. Also remember that this will also be affected by browser settings – some browsers may be configured to always download PDF files or open … Read more

What is Common Gateway Interface (CGI)?

CGI is an interface which tells the webserver how to pass data to and from an application. More specifically, it describes how request information is passed in environment variables (such as request type, remote IP address), how the request body is passed in via standard input, and how the response is passed out via standard … Read more

How can I troubleshoot my Perl CGI script?

This answer is intended as a general framework for working through problems with Perl CGI scripts and originally appeared on Perlmonks as Troubleshooting Perl CGI Scripts. It is not a complete guide to every problem that you may encounter, nor a tutorial on bug squashing. It is just the culmination of my experience debugging CGI … Read more

CGI page won't load

I don’t know what you mean by “I cannot get this page to load”. Exactly what unexpected behaviour do you see? You you see anything in the browser? What about if you “view source”? Is there anything useful in the web server error log? Your CGI code looks like something from the last millennium. It … Read more