I 'm developing a web site using php & mysql. There is a functionality which user can upload images for their profile. and Others can view those uploaded images by entering to the particular user's profile page. When user uploading the image in the back end its create a folder name it using userID (ex; user1234) and particular image will be placed to this folder and image path is stored in the DB. when displaying user profile its refer images which has been uploaded (path retrieve from db which has stored earlier). I have tested this using windows platform (WAMP) and worked as I desired. but now I have deploy this web site in a Linux base server(LAMP). problem is now those uploaded images doesn't display in the site. then I check the server and saw images has been uploaded as desired. then I back up those uploaded image folders and delete them from the server. Thereafter after I placed backup image folder again. now its working. Anybody can tell me the reason. why it is not directly referring those images?? .
Contrary to windows based servers, Unix one are case sensitive in terms of paths. Copy your image paths from your database directly to the browser to see if the image is there. That's just an idea. Anyway, having the code would provide a better understanding.
Thanx for ur idea but the case is not with the code. because I backed up those image folder into my machine and delete them from the server. then I placed those backed up image files folder into the server again. then itz working without having a problem. I feel issue is related to folder permission or file permission. by the way any thoughts on that?? still if u feel, u need code then I can send you
If the functionality of loading the image file on the server is working properly then it your privilege is high enough to read and display it from the server. After uploading the image to the server, if you take the URL created in the DB and paste it directly in the browser address bar, without having backed up your files back and forth, does it display the image alone? if it does, please put down the php code used to retrieve the path from the DB to display the image.
Look at the privileges of the created folder. and compare that to folders that can display information. Most shared hosting apache servers require that web accessible folders be set to RWXR.XR.X (or 755) and files be RW.R..R.. (644) I am guessing that the directories and or files are being created with different privileges. -Jason
Thnx DopeDomains and all, Problem was related to permission while creating the Folder. i hv ser it to 0700 (mkdir($targetPath, 0700); ) I change it to mkdir($targetPath, 0755); now itz working thanx to u all keep it up cheers - Madura