You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Daniel Jonda <da...@jonda.de> on 2002/03/26 01:45:13 UTC

activating multimedia files in cgi-bin

Hi.
I have a short question about perl and apache httpd server.
Where can I activate that multimedia files like gifs and jpgs 
run under my cgi-bin dir ?

Thanks a lot
Daniel Jonda

Re: AW: activating multimedia files in cgi-bin

Posted by Luciano Miguel Ferreira Rocha <st...@nsk.yi.org>.
On Tue, Mar 26, 2002 at 02:12:52AM +0100, Daniel Jonda wrote:
> Thanks for your fast answer.
> I don't want to "run" them. I want to display them on my website
Oh, ok.

> My problem is :
> I have an image gallery, which is configured to have the images folders
> under the cgi-bin. And it isn`t possible to see them on my website.
> http://www.flyerfabrik.de/cgi-bin/gallery/gallery.cgi
Your script runs fine, so it doesn't seem to be a perl problem.

I think it might be a configuration problem of the script it self, it may
be looking for images on /var/www/cgi-bin/gallery/something instead of
/usr/local/apache/cgi-bin/gallery or the other way around.

Check the source for any reference to the image directory and change it
as appropriate.

> Where can I change the configuration of perl to show these mm-files on
> my website ?
Well, Apache doesn't serve normal files in the cgi-bin directory, he trys
to run them. But the script you use doesn't refer to the image file, but
it serves the image by itself (or so I think by the little I have seen).
The main problem seems to be that the script doesn't find the files, it
lists no image in any category.

So your problem may be the first I told about, or it may be that the
image directory doesn't have the appropriate permissions for the script to
read it and files within it. Make sure the directory has permissions for
execution and reading by the user that apache runs as (normally nobody or
apache) and permissions for reading by that same user. You could just
find /dir -type d -exec chmod 0755 {} \;
find /dir -type f -exec chmod 0644 {} \;

Regards,
Luciano Rocha

[OT] activating multimedia files in cgi-bin

Posted by Ernest Lergon <er...@virtualitas.net>.
Daniel Jonda wrote:
> 
> http://www.flyerfabrik.de/cgi-bin/gallery/gallery.cgi
> 
See

http://httpd.apache.org/docs/mod/mod_alias.html#scriptalias

It is a very bad idea to place content below /cgi-bin.

Everything what is called below /cgi-bin is interpreted as a skript -
apache want's to "run" it, as Luciano said correctly.

E.g.:

If I call your skript with Netscape ("Stylesheets on") I receive an
internal server error for this address:

http://www.flyerfabrik.de/cgi-bin/gallery/skins/default/styles.css

Turning it off, the script runs, but the images are not displayed. It's
the same as above:

http://www.flyerfabrik.de/cgi-bin/gallery/skins/categoryfolder.gif

gives 500 Internal server error.

So relocate your stuff.

Ernest


P.S.: This is OT, IMHO.


-- 

*********************************************************************
* VIRTUALITAS Inc.               *                                  *
*                                *                                  *
* European Consultant Office     *      http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon          *
* Friedrichstraße 95             *    mailto:Ernest@virtualitas.net *
* 10117 Berlin / Germany         *       ums:+49180528132130266     *
*********************************************************************


AW: activating multimedia files in cgi-bin

Posted by Daniel Jonda <da...@jonda.de>.
Thanks for your fast answer.
I don't want to "run" them. I want to display them on my website

My problem is :
I have an image gallery, which is configured to have the images folders
under the cgi-bin. And it isn`t possible to see them on my website.
http://www.flyerfabrik.de/cgi-bin/gallery/gallery.cgi

Where can I change the configuration of perl to show these mm-files on
my website ?

Thanks
Daniel

-----Ursprungliche Nachricht-----
Von: Luciano Miguel Ferreira Rocha [mailto:strange@nsk.yi.org] 
Gesendet: Dienstag, 26. Marz 2002 01:58
An: Daniel Jonda
Cc: modperl@apache.org
Betreff: Re: activating multimedia files in cgi-bin

On Tue, Mar 26, 2002 at 01:45:13AM +0100, Daniel Jonda wrote:
> Hi.
> I have a short question about perl and apache httpd server.
> Where can I activate that multimedia files like gifs and jpgs 
> run under my cgi-bin dir ?
GIFs, JPGs, etc, don't *run*. They're not executable code. They
can be served, as a simple stream of bytes, with the headers
informing of the type.

But they aren't run, and you shouldn't put them in you cgi-bin dir.
Put them any place else, it doesn't matter as long as the webserver
is configured to serve them and has permissions to read them.

Regards,
Luciano Rocha

-- 
Luciano Rocha, strange@nsk.yi.org

The trouble with computers is that they do what you tell them, not what
you want.
                -- D. Cohen



Re: activating multimedia files in cgi-bin

Posted by Luciano Miguel Ferreira Rocha <st...@nsk.yi.org>.
On Tue, Mar 26, 2002 at 01:45:13AM +0100, Daniel Jonda wrote:
> Hi.
> I have a short question about perl and apache httpd server.
> Where can I activate that multimedia files like gifs and jpgs 
> run under my cgi-bin dir ?
GIFs, JPGs, etc, don't *run*. They're not executable code. They
can be served, as a simple stream of bytes, with the headers
informing of the type.

But they aren't run, and you shouldn't put them in you cgi-bin dir.
Put them any place else, it doesn't matter as long as the webserver
is configured to serve them and has permissions to read them.

Regards,
Luciano Rocha

-- 
Luciano Rocha, strange@nsk.yi.org

The trouble with computers is that they do what you tell them, not what
you want.
                -- D. Cohen