Lunarpages Web Hosting Forum

Author Topic: Pictures in cgi-bin...?  (Read 4898 times)

Offline Guldstrand

  • Galactic Royalty
  • *****
  • Posts: 245
    • EgenSida
Pictures in cgi-bin...?
« on: November 25, 2004, 12:55:56 AM »
If i need to have some pictures in the cgi-bin folder, what do i need to CHMOD it to...?
(I uploaded the pictures in binary-mode.)

Because i allready have som pictures in the cgi-bin folder, but i canīt display them.  :cry:
::: Guldstrand :::

That i donīt allready know, i really want to learn...


Offline Guldstrand

  • Galactic Royalty
  • *****
  • Posts: 245
    • EgenSida
Pictures in cgi-bin...?
« Reply #2 on: November 25, 2004, 09:11:48 AM »
I get no errors just crosses (x)...  :o
::: Guldstrand :::

That i donīt allready know, i really want to learn...

Offline TranzNDance

  • Princess of Naboo
  • Berserker Poster
  • *****
  • Posts: 11567
    • Thu Tu's Blog
Pictures in cgi-bin...?
« Reply #3 on: November 25, 2004, 09:14:58 AM »
Could you post a link to the page, please?
:whip: :love: :whip: :love: :whip: :love:

Offline Guldstrand

  • Galactic Royalty
  • *****
  • Posts: 245
    • EgenSida
Pictures in cgi-bin...?
« Reply #4 on: November 25, 2004, 10:50:54 AM »
The link to the page is http://www.skanetech.com/cgi-bin/minfaktura/index.pl , there is (or should be) a picture/image at the top on the left side.  :?
::: Guldstrand :::

That i donīt allready know, i really want to learn...

Offline TranzNDance

  • Princess of Naboo
  • Berserker Poster
  • *****
  • Posts: 11567
    • Thu Tu's Blog
Pictures in cgi-bin...?
« Reply #5 on: November 25, 2004, 11:13:35 AM »
hmmm... When trying to view the image directly, I got a 500 error. The permissions seem right. I don't know much about cgi, so is it possible that you can't have certain files in cgi-bin? :?
:whip: :love: :whip: :love: :whip: :love:


Offline Guldstrand

  • Galactic Royalty
  • *****
  • Posts: 245
    • EgenSida
Pictures in cgi-bin...?
« Reply #7 on: November 25, 2004, 01:55:06 PM »
But if i donīt store the images in the cgi-bin then i have to change the path in all files.  :(

I have allready CHMOD the images to 644 so i will try 755 next.
::: Guldstrand :::

That i donīt allready know, i really want to learn...

Offline Guldstrand

  • Galactic Royalty
  • *****
  • Posts: 245
    • EgenSida
Pictures in cgi-bin...?
« Reply #8 on: November 25, 2004, 01:58:17 PM »
Nope! That didnīt help either...  :cry:
::: Guldstrand :::

That i donīt allready know, i really want to learn...

leighsww

  • Guest
Pictures in cgi-bin...?
« Reply #9 on: December 04, 2004, 05:45:50 PM »
Guldstrand, you are using an add-on domain I bet.

Here try this:

http://www.guldstrands.net/skanetech/cgi-bin/minfaktura/index.pl

Danielle

  • Guest
Pictures in cgi-bin...?
« Reply #10 on: December 04, 2004, 09:28:35 PM »
Actually, whenever I have placed any images into my cgi-bin on any account, they do not work:

http://stoneofendar.com/cgi-bin/secure_site.gif

Same picture outside the cgi-bin (just basically copied it using File Manager into my images folder so it is the same image, permissions and everything):

http://stoneofendar.com/images/secure_site.gif

What I am noting is that image files cannot be placed into the cgi-bin.  You need to have them outside of it and link to them for them to work.  It shouldn't be a big issue to change the paths.  Just use a program like Dreamweaver (which you can freely download from www.macromedia.com for a 30 day trial) to use find and replace.  They will allow a mass replace for all files in the site you define, so you can change the paths in one fell swoop.

leighsww

  • Guest
Pictures in cgi-bin...?
« Reply #11 on: December 04, 2004, 09:43:36 PM »
Actually, Dani, his image is showing from his sub-directory's cgi-bin, see:

http://www.guldstrands.net/skanetech/cgi-bin/minfaktura/logo.gif

Thus, the link I gave in my previous post shows that the .pl file works as long as he calls the file from his main URL.

He probably has hotlinks protection on and doesn't have his http://skanetech.com URL in the allow URLs. If he adds that URL, he'll probably be able to call the image from the add-on domain then.

Danielle

  • Guest
Pictures in cgi-bin...?
« Reply #12 on: December 04, 2004, 10:00:59 PM »
Actually, a cgi-bin created inside a subdomain folder will work as you did note, but I was noting that one inside the public_html folder or using a direct domain name path such as http://domain.com/cgi-bin/image.gif will not.  Try this on your own account.  Use the cgi-bin directly inside the public_html folder (the one created with the account), then use an image inside another cgi-bin such as another folder inside public_html or a subdomain folder.  This works on my account:

http://stoneofendar.com/sb/cgi-bin/secure_site.gif

This does not work on my account:

http://stoneofendar.com/cgi-bin/secure_site.gif

http://screeningblock.com/cgi-bin/secure_site.gif (this is the addon domain for the stoneofendar.com/sb/ path)

I do not have hotlinking on my account.

I did not realize that a second removed cgi-bin would work, but it shouldn't.  Images aren't supposed to be placed into the cgi-bin, only pl and cgi scripts (and py scripts, almost forgot them) are supposed to be there.

Offline Guldstrand

  • Galactic Royalty
  • *****
  • Posts: 245
    • EgenSida
Pictures in cgi-bin...?
« Reply #13 on: December 05, 2004, 01:43:47 AM »
Quote from: leighsww
Guldstrand, you are using an add-on domain I bet.

Here try this:

http://www.guldstrands.net/skanetech/cgi-bin/minfaktura/index.pl

Yes, now it works!  :)

So i need to add http://www.skanetech.com in the hotlink protection section for all to work with cgi-bin or what?
::: Guldstrand :::

That i donīt allready know, i really want to learn...

leighsww

  • Guest
Pictures in cgi-bin...?
« Reply #14 on: December 05, 2004, 11:08:42 AM »
Quote from: Guldstrand
So i need to add http://www.skanetech.com in the hotlink protection section for all to work with cgi-bin or what?

Yes, go ahead and add it to your allow URLs and see if the image shows via your add-on domain :)

Dani - it worked for me using a direct domain for a sub-directory cgi-bin (although, I manually created the cgi-bin, so I don't know if that matters, LOL  :) ) :

* link removed as it is no longer needed *

The above is a parked domain on my main account. I am going to remove the link once you've seen it, so let me know.

I do agree with you that images should not be put in the cgi-bin, but since Guldstrand mentioned that he didn't want to have to redo all his links, I figured he still could utilize the fix.