Viewing images in my CGI-BIN

Discussion in 'Perl Misc' started by Robert TV, May 30, 2004.

  1. Robert TV

    Robert TV Guest

    Hello, I am writing a perl script that uploads images from my computer to my
    web site. The images get dumped inside a special forder in my cgi-bin. For
    some reason, once the images have arrived, they cannot be viewed in my
    browser. The URL is have entered are correct, but they always show up
    broken. If I use my ftp program to move the images out of the cgi-bin and
    into a normal html forlder they appear fine. I have also played with the
    file permissions of the images when in the cgi-bin, but to no avail. Can
    anyone help me? TAI

    Robert
     
    Robert TV, May 30, 2004
    #1
    1. Advertising

  2. Robert TV

    Eric Bohlman Guest

    "Robert TV" <> wrote in
    news:M2suc.592322$Pk3.108148@pd7tw1no:

    > Hello, I am writing a perl script that uploads images from my computer
    > to my web site. The images get dumped inside a special forder in my
    > cgi-bin. For some reason, once the images have arrived, they cannot be
    > viewed in my browser. The URL is have entered are correct, but they
    > always show up broken. If I use my ftp program to move the images out
    > of the cgi-bin and into a normal html forlder they appear fine. I have
    > also played with the file permissions of the images when in the
    > cgi-bin, but to no avail. Can anyone help me? TAI


    It's a web-server configuration issue, nothing Perl-specific. Web servers
    are normally configured to map URLs that point into a CGI directory or
    subdirectory into requests to execute code rather than to deliver files.
    And there are good reasons for this to be so. If you want uploaded files
    to be immediately servable, your upload handler needs to put them somewhere
    they can be served from. It's that simple.
     
    Eric Bohlman, May 30, 2004
    #2
    1. Advertising

  3. "Robert TV" <> wrote in
    news:M2suc.592322$Pk3.108148@pd7tw1no:

    > Hello, I am writing a perl script that uploads images from my computer
    > to my web site. The images get dumped inside a special forder in my
    > cgi-bin. For some reason, once the images have arrived, they cannot be
    > viewed in my browser. The URL is have entered are correct, but they
    > always show up broken. If I use my ftp program to move the images out
    > of the cgi-bin and into a normal html forlder they appear fine. I have
    > also played with the file permissions of the images when in the
    > cgi-bin, but to no avail. Can anyone help me? TAI


    This has absolutely nothing to do with Perl.

    Most probably, your web server is configured to treat everything in cgi-bin
    as a program to be run. It is generally a good idea to keep content and
    executable locations separate.

    --
    A. Sinan Unur
    (reverse each component for email address)
     
    A. Sinan Unur, May 30, 2004
    #3
  4. Robert TV

    Eric Bohlman Guest

    Eric Bohlman <> wrote in
    news:Xns94F9A7C8EC3B4ebohlmanomsdevcom@130.133.1.4:

    > It's a web-server configuration issue, nothing Perl-specific. Web
    > servers are normally configured to map URLs that point into a CGI
    > directory or subdirectory into requests to execute code rather than to
    > deliver files. And there are good reasons for this to be so. If you
    > want uploaded files to be immediately servable, your upload handler
    > needs to put them somewhere they can be served from. It's that
    > simple.


    P.S. Any further discussion of this should take place in
    comp.infosystems.www.authoring.cgi, since it's not Perl-specific.
     
    Eric Bohlman, May 30, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Mitchell

    Can "bin" be changed to "cgi-bin" for asp.net

    Kevin Mitchell, Oct 19, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    1,026
    Wim Hollebrandse
    Oct 19, 2003
  2. John Salerno
    Replies:
    30
    Views:
    2,026
    Stephan Kuhagen
    Aug 10, 2006
  3. anne001
    Replies:
    1
    Views:
    590
  4. zippy

    cgi and cgi-bin

    zippy, Feb 1, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    482
    Sam Holden
    Feb 2, 2005
  5. BestFriend
    Replies:
    2
    Views:
    919
Loading...

Share This Page