homepage Welcome to WebmasterWorld Guest from 54.235.227.60
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
FTP won't open certain folders
Too many images?
phill2000star




msg:3556674
 9:01 am on Jan 24, 2008 (gmt 0)

Hi all,

I recently redesigned a site for a customer who has an online ecommerce site.

He now has a database driven site, with over 2,000 products. 75% of them products require "sample" files as well as images of the product. I have the site setup similarly to this:

html_root/images
html_root/images/products
html_root/images/products/thumbs
html_root/samples

images (2.3Mb total with 113 files in folder).
images/products (23.7Mb total with 2092 files in folder).
images/products/thumbs (3.8Mb total with 1025 files in folder).
samples (2.2Gb total with 3,214 files in folder).

As you can see the samples folder contains a lot of files and is 2.2Gb in size!. Now I can use ws_ftp to connect to the site, and browse more or less all the folders, however if I try to browse to html_root/images/products, html_root/images/products/thumbs or html_root/samples, then it takes ages to "think" about it and displays an empty folder (and I know it's not as the webpage displays the product info / images / samples.

This however means the client can no longer open the folder to upload further product images / samples etc!

Now I don't know what to do with regards to this, and would like some advice on what to do? I have spoken to my host and they say I am right, the FTP server is timing out whilst it trys to list the directory, due to the size of files, qty of files etc.

What can anyone suggest?

Cheers guys

 

sonjay




msg:3556750
 11:26 am on Jan 24, 2008 (gmt 0)

There's a setting somewhere deep in the bowels of the server configuration that limits the number of files to be displayed in directory listings in an FTP program. I ran into that a couple of years ago -- in my case, my ftp program would list up to 4,000 files, but no more. This might be the case for you, and you're simply getting a slightly different response in your ftp program (i.e., timing out instead of a partial file listing).

It was a VPS, so I was able to change the setting and see all my files. If you're on shared hosting, I don't know if that's something they would be willing to change for you.

Or it might be exactly what it looks like -- a simple timeout when your program attempts to get the entire directory listing. Have you tried any other ftp programs to see if you can get the actual directory listing?

phill2000star




msg:3557689
 9:51 am on Jan 25, 2008 (gmt 0)

Hiya,

I am currently using ws_ftp as the client.

I was thinking of moving all the images into seperate folders like so

html_root/images/products/00000 (contains imgs for 1st 1000 products)
html_root/images/products/01000 (contains imgs for 2nd 1000 products)
html_root/images/products/02000 (contains imgs for 3rd 1000 products)
html_root/images/products/03000 (contains imgs for 4th 1000 products)
html_root/images/products/04000 (contains imgs for 5th 1000 products)

etc...

I was then thinking of using .htaccess to take each request for images in the original html_root/images/products/ folder and use a php script to 'serve' that image. This would work in the following:-

requested file:-
[domain.com...]

.htaccess takes the request and passes info on to following script:-
[domain.com...]

The php script would look at the product_id, look in the relevant folder for it, and the read the file before outputting it (don't know how to do this regarding headers etc).

Can anyone see a problem with doing it this way?

If I have a page which displays 20 products per page, will this cause issues (1.5kb for each thumbnail, requested 20 times = much additional server load?).

Cheers guys!

phill2000star




msg:3558710
 3:51 pm on Jan 26, 2008 (gmt 0)

Anyone?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved