John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to use cpan:faceplant after the article at http://www.perl.com/pub/a/2004/04/01/masongal.html, but it is not working right.

The images don't show up. The thumbnails show as zero-width boxes with the blue href border around, and the main image does not show anything at all.

If I copy the img src URL to the address bar, it tells me "file not found", which is odd because I would expect to see the broken-image icon in the browser instead of zero-size holes.

How do I even begin to trouble-shot this?

—John

Replies are listed 'Best First'.
Re: Using Mason etc.
by Corion (Patriarch) on Jul 14, 2008 at 06:17 UTC
    GET -USe http://localhost/image/url

    This will show you the headers and content that gets sent back. Most likely, the text that you see is the truth. "File not found" likely means that the file was not found. Maybe the webserver error log has more information. Maybe there is an easily-spotted typo in the configuration file.

    Most likely, you're not seeing "broken image" images because the error message gets sent as text/html or text/plain, but that's just a guess.

      Thanks for the tip.

      The Apache configuration for that virtual domain was already set up to run all .html files through Mason, and worked on some simple files. The only thing else in the configuration, mentioned in the article but not performed by the make install, is to disable external access to private files in case someone types a URL explicitly. I did not add lines for that yet.

      ... and if you're using Firefox and working on any sort of web-based application, I highly suggest installing firebug, as it'll let you examine what was sent/received for each request on the page, in context (including AJAX, etc.).

      If you're not using Firefox (and I think the plugin still required Firefox 2, even), it's worth using Firefox+firebug just for debugging -- especially if you're doing anything significant with JavaScript.