PDA

View Full Version : Upload File Script...can't find the file once the form is submitted


crubbles
02-07-2003, 09:18 PM
I found an "Upload File" script and tried to implement it into one of the pages on my site.

When I started 'customizing' the script to my site I realized I didn't know how to find the Unix path to the directory I wanted to upload the file to. The url path is:

http://www.mysite.com/cgi-bin/uploads/

I know I CHMOD'ed everything right...however I have no clue how to find out the Unix path. Anyone know?

BJ

Oh, and one more quick question :o When I go to http://www.mysite.com and none of the images will show up.

However, when I go to http://www.mysite.com/index.html everything's straight.

This is makin me go crazy!! :rolleyes: I'm totally not understanding the Unix path vs the URL path.

I put my site in the public_html directory and when I took a look at the www directory it was an exact mirror of all the files I ftp'ed to the public_html directory. Does that have anything to do with my problem?

and for anyone who read to the end of this post...thank you ;)

crubbles
02-07-2003, 09:20 PM
oops, quick correction. The index page pulls an iframe....all the images on the iframe show up fine. its just the shell (index) page that no images show.

Grizz2
02-08-2003, 05:38 AM
I've attached a zip file with a server info script inside..Unzip it, upload to your cgi-bin, chmod to 755..Then in your browser type www.yoursitename.com/cgi-bin/serverinfo.cgi

The SCRIPT_FILENAME will give you the server path to the script..One of mine looks something like this:

/www/htdocs/mysite/cgi-bin/serverinfo.cgi

Take off the "serverinfo.cgi" and add "uploads"
Not sure if you need the trailing slash or not. Probably depends on the script?

/www/htdocs/mysite/cgi-bin/uploads.

As far as your images, I guess maybe look at the html and make sure the img src is pointing to the right place?

crubbles
02-08-2003, 04:09 PM
Thanks much for the file, it worked perfectly. I found the path for the file. However, the script didn't work even with the correct server path. I dont' have a clue what I'm doin wrong, more's the pity.

The script forwards me to the confirmation page as it was intended to, the problem is that I can't find the file that I supposedly uploaded to the server.

But I'm more worried about why the images dont show on the index page. I'm 100% sure they are referenced correctly.

If someone felt inclined to, I would be forever grateful for a personal servant friend who wanted to offer some advice by IM.

AIM: crubbles890
MSN: crubbles@hotmail.com
YIM: crubbles890

crubbles
02-08-2003, 07:00 PM
I figured if I didn't know what I was doing with a CGI script it'd be better off if I didn't act like a leech on the forum and beg for help cuz I'm i over my head. I bought a dedicated program and now my web forms and upload page works perfectly.

The problem with the index page still remains however. If anyone has any ideas why none of the images show up when I go to:

http://mysite.com

but when I go to:

http://mysite.com/index.html

the images do show.

This has me completely baffled...

Grizz2
02-09-2003, 05:20 AM
I tried both links and they looked the same to me. Didn't see any missing pictures.. Maybe try clearing your browser cache if you are still having problems.
Grizz