Image display from hosting server
I am totally stuck and hope that someone here might have had the same problem in the past.
When I test my code under localhost, all images displays perfect, not so when uploaded from my hosting server.
What it does: It uploads data from the database as a description of an article for sale - no problem, loads perfect. It then displays a main image with 3 thumbnails below that. Not showing images.
I have clicked on "inspect element", the picture name and folder was returned from the database 100% i.e. uploads/folder30/1.jpg.
I then checked, the image does exist in the root folder under uploads/folder30. The same problem with the thumbnails, also shows that the correct naming was returned but no images is showing although it does exist in its respective folders.
I have checked all naming conventions, all folders and images is named correctly with the correct lowercase used (all folders and images naming is in lowercase).
I also thought it might be the image sizes - main image is a 600x400 pixel image and thumbs is 100x100 pixel images. also, not the problem. I then uploaded larger images AND smaller images, still did not resolve the problem.
I am at my wits end here and will reaaly appreciate all input I can find. I have searched endlessly for the same error, could not find 1 link where a user had a similar problem.
Thanx guys/Gals.
Related Article: image display in php
is a PHP discussion thread by Venter that has 1 reply, was last updated 3 months ago and has been tagged with the keywords: how, to, display, multiple, images, from, db, table, in, a, singlerow.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Can you share the link to the faulty online page?
pritaeas
Posting Prodigy
9,265 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,456
Skill Endorsements: 86
You will find it here Pritaeas, thanx.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
If I click on the image in Opera DragonFly to open the image link directly, I get "403 Forbidden".
pritaeas
Posting Prodigy
9,265 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,456
Skill Endorsements: 86
mmm, I've added a .htaccess file in the folder, can it be that. Inside htaccess file - "Options -Indexes"
I've added the file to every folder for that matter to protect the contents within.
I can remove it if you like to see content.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
-Indexes just means that you cannot request a directory list. Perhaps there is an inherited security active?
pritaeas
Posting Prodigy
9,265 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,456
Skill Endorsements: 86
I'll have a look into that now from a server point of view. Will let you know soon, thanx sofar.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Ok, 2 days later...
It seems that the clients hosting was managed by another company on the same root folder. with different users. I eventually got the correct path to the image folder from Hetzner, all is fine now.
Thanx Pritaeas...
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Question Answered as of 6 Months Ago by
pritaeas