Lunarpages Web Hosting Forum

Author Topic: CGI upload script  (Read 10395 times)

leighsww

  • Guest
CGI upload script
« Reply #15 on: July 23, 2004, 05:23:54 PM »
Quote from: fo0hzy
However, clicking the link to the image give me a 'page cannot be found error', and the path is incorrect:

http://www.dangerouslystupid.lunarpages.com/cgi-bin/www.dangerouslystupid.lunarpages.com/uploads/spaceDog.gif


Okay, it looks like that error has the sub_domain URL after the cgi-bin directory, so when you give me the info about where that sub-domain folder is, we'll figure out the $dir path

leighsww

  • Guest
CGI upload script
« Reply #16 on: July 23, 2004, 05:25:38 PM »
Quote from: TranzNDance
I'm using an upload script that uploads to a folder that is 755. :?


Okay, GREAT, he could have left it then. I didn't know that  :)

Offline fo0hzy

  • Intergalactic Superstar
  • *****
  • Posts: 168
CGI upload script
« Reply #17 on: July 23, 2004, 05:26:36 PM »
Hmm... I'm not even sure what you mean? The path to cgi is /public_html/cgi-bin/ :-?

I only have a subdomain for another day or so, and the DNS stuff should kick in for my domain...
www.awfulpics.com could not be found. Please check the name and try again.

leighsww

  • Guest
CGI upload script
« Reply #18 on: July 23, 2004, 05:33:12 PM »
Oh, then you will have to change the script configs once your domain kicks in cuz the sub-domain path would not be applicable.

Okay, let me see where this error is in the path:
Quote
The requested URL /cgi-bin/www.dangerouslystupid.lunarpages.com/uploads/spaceDog.gif was not found on this server.


Point me to the URL to your webpage where the form is at, as well.

Offline fo0hzy

  • Intergalactic Superstar
  • *****
  • Posts: 168
CGI upload script
« Reply #19 on: July 23, 2004, 05:35:15 PM »
http://www.dangerouslystupid.lunarpages.com/upload.html


If you paste this part into your browser, you should be able to see the image (I can): www.dangerouslystupid.lunarpages.com/uploads/spaceDog.gif
www.awfulpics.com could not be found. Please check the name and try again.

Offline fo0hzy

  • Intergalactic Superstar
  • *****
  • Posts: 168
CGI upload script
« Reply #20 on: July 23, 2004, 05:37:07 PM »
Quote from: leighsww
Quote from: TranzNDance
I'm using an upload script that uploads to a folder that is 755. :?


Okay, GREAT, he could have left it then. I didn't know that  :)


LOL I'll wait until it's working before I try setting it to 755 :wink:
www.awfulpics.com could not be found. Please check the name and try again.

leighsww

  • Guest
CGI upload script
« Reply #21 on: July 23, 2004, 05:38:24 PM »
Yes, I can see the image.  Was that what you just uploaded via your form?

Okay, let's do a relative URL instead of an absolute URL for this line, so change this:

Code: [Select]
<form action="http://www.dangerouslystupid.lunarpages.com/cgi-bin/upload.cgi" method="post" enctype="multipart/form-data">

to this:

Code: [Select]
<form action="/cgi-bin/upload.cgi" method="post" enctype="multipart/form-data">

And see if we still get that error.

Offline fo0hzy

  • Intergalactic Superstar
  • *****
  • Posts: 168
CGI upload script
« Reply #22 on: July 23, 2004, 05:44:51 PM »
Yep, I've uploaded a few images already, testing it out

Okay, did that and still get 'page not found'... but at least it still works. Maybe I should go ahead and chmod the uploads folder to 755?
www.awfulpics.com could not be found. Please check the name and try again.

Offline fo0hzy

  • Intergalactic Superstar
  • *****
  • Posts: 168
www.awfulpics.com could not be found. Please check the name and try again.

Offline TranzNDance

  • Princess of Naboo
  • Berserker Poster
  • *****
  • Posts: 11567
    • Thu Tu's Blog
CGI upload script
« Reply #24 on: July 23, 2004, 05:49:37 PM »
Quote from: fo0hzy
Maybe I should go ahead and chmod the uploads folder to 755?

It would be more secure.
:whip: :love: :whip: :love: :whip: :love:

Offline fo0hzy

  • Intergalactic Superstar
  • *****
  • Posts: 168
CGI upload script
« Reply #25 on: July 23, 2004, 05:54:45 PM »
Okay done :D
www.awfulpics.com could not be found. Please check the name and try again.

leighsww

  • Guest
CGI upload script
« Reply #26 on: July 23, 2004, 05:55:11 PM »
Quote from: fo0hzy
Yep, I've uploaded a few images already, testing it out

Okay, did that and still get 'page not found'... but at least it still works. Maybe I should go ahead and chmod the uploads folder to 755?


Yes, you can go ahead and try the chmod.

Now to find the problem for this error.  Hmmm, it might be due to the sub-domain.  I'm thinking that when your domain takes effect it'll probably work just fine. Maybe someone can spot it where I can't right now.

When your domain takes effect, remember to make the necessary changes to the $folder and  $domain configs in your script when it does.

When it does take effect, these will need to be:

Code: [Select]
$folder = "http://www.dangerouslystupid.com/uploads/";
$domain = "www.dangerouslystupid.com";

leighsww

  • Guest
CGI upload script
« Reply #27 on: July 23, 2004, 05:56:40 PM »
Quote from: fo0hzy
Okay done :D


LOL, looks like 2 posts got put up before I could finish my post to you.  :)

Thu is always on the ball!  :thumb:

Offline fo0hzy

  • Intergalactic Superstar
  • *****
  • Posts: 168
CGI upload script
« Reply #28 on: July 23, 2004, 05:57:49 PM »
In fact, I just got notice that the domain has resolved to the lunar pages servers... waiting for support to switch it over for me right now :thumb:

I chmodded the uploads folder to 755 and it still works fine.
www.awfulpics.com could not be found. Please check the name and try again.

leighsww

  • Guest
CGI upload script
« Reply #29 on: July 23, 2004, 06:00:22 PM »
GREAT!  :yey: