webmaster1 Posted April 1, 2009 Share Posted April 1, 2009 Hi All, I'm under pressure to finish a site but I'm having difficulty displaying an image via php: <?php //DISPLAY IMAGE echo "<img src='images/menu_thumbnail_bg.jpg'/>"; ?> When I try and pull up the image by directly linking to it address in my browser I get the following error: Forbidden You don't have permission to access /images/menu_thumbnail_bg.jpg on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Could somebody please assist me with this? It's really annoying. The permissions are the same as every other image. My index page has .php extension. Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/ Share on other sites More sharing options...
webmaster1 Posted April 1, 2009 Author Share Posted April 1, 2009 I've googled it already but it goes way over my head. Most solutions focus on the index page whereas I'm having a problem with an image. It turns out that it doesn't work in html either. :'( Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799003 Share on other sites More sharing options...
PFMaBiSmAd Posted April 1, 2009 Share Posted April 1, 2009 Do other images work and where are they located? Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799005 Share on other sites More sharing options...
webmaster1 Posted April 1, 2009 Author Share Posted April 1, 2009 Yes. The problem is only with menu_thumbnail_bg.jpg. You can view the directory for yourself here: http://www.kilkennyautocentre.ie/images/ Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799009 Share on other sites More sharing options...
Maq Posted April 1, 2009 Share Posted April 1, 2009 Check the permissions of it. What are the permissions of the rest of the images? ls -al Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799011 Share on other sites More sharing options...
elis Posted April 1, 2009 Share Posted April 1, 2009 Have you tried setting the access to 777, just to see whether it works? Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799013 Share on other sites More sharing options...
webmaster1 Posted April 1, 2009 Author Share Posted April 1, 2009 All images are at 6 4 4. I tried 7 7 7 without success. Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799015 Share on other sites More sharing options...
PFMaBiSmAd Posted April 1, 2009 Share Posted April 1, 2009 The permissions might be the same, but if the owner permissions are not set to all, is the owner the same? Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799016 Share on other sites More sharing options...
webmaster1 Posted April 1, 2009 Author Share Posted April 1, 2009 The permissions might be the same, but if the owner permissions are not set to all, is the owner the same? How would I check the owner permissions? I'm using cpanel. Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799019 Share on other sites More sharing options...
webmaster1 Posted April 1, 2009 Author Share Posted April 1, 2009 Alritey then. I renamed the file to menupanel.jpg from menu_banner_bg.jpg and it now works. This is odd to say the least. Solution: Change file name. Logic: Apparently none. Quote Link to comment https://forums.phpfreaks.com/topic/152135-404-not-found-you-dont-have-permission/#findComment-799024 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.