Hi My site has thousands of products and lots of images (i.e. around 2.1 lacs ). and mostly all things are being done by script ( product import, img upload etc ). While moving img to proper location by script, a few of them have been 0 byte size. so now writing a script to find out all img from the servers whose size is 0 byte. but what happens is when i check if the img exists on the server and the size is 0 byte by php functions like file_get_contents(), file_exist(), filesize() etc. its looping :| The reason is my img directory has lots of images so after querying my product table, this functions applies for each product in loop and for each iteration it checks whole img directory to perform the operation thats why it keeps looping i think :$ Anybody knows how to resolve this problem, or any other alternative is there which can fulfill my requirement. Your help will be really appreciated Thanks Raj
Raj- Can you just do a directory listing to find the files and skip the database query? I'm not sure I 100% understand why you have an infinite loop, unless you are trying to open files that don't exist without error checking.