Page 1 of 1

<Solved>could not load jpg, gif files.

PostPosted: 11. July 2009 03:54
by hanpedro
could not load jpg, gif files.

I installed xampp for windows 1.7.1 and tried to load my web page.
But I could not see only x-marks for jpgs and gifs.

Phpmyadmin shows same.

Any comment would be appreciated.

Re: could not load jpg, gif files.

PostPosted: 11. July 2009 09:57
by Wiedmann
There is something in the XAMPP for Windows FAQ about images and style sheets not loading.

Re: could not load jpg, gif files.

PostPosted: 11. July 2009 12:09
by hanpedro
Wiedmann,

I've read it, and tried as follows.
1) activating
2) deactivating
EnableMMAP off
EnableSendfile off


However still it is not browsing pictures.

But jpg link of this server brows picture.
http://192.168.0.2/test/test.jpg

Wiedmann wrote:There is something in the XAMPP for Windows FAQ about images and style sheets not loading.

Re: could not load jpg, gif files.

PostPosted: 11. July 2009 23:28
by TazzyT
I had this same problem and have pulled a lot of hair but I figured it out. Maybe this will help you as well.

I was trying to view a local copy of a clients site and couldnt view any images. The css file loaded but not the images from the css file. Eventually I noticed the sites that would not display images contained a copy of the online sites .htaccess file and the sites that would display did not have the onlines .htaccess file. I deleted my local copy of the .htaccess file as the local site is for testing only (no public access), refreshed the page, and all my images appeared.

In your local site folder look for a .htaccess file. Here you have 2 options:

1) delete the local .htaccess (local only) file (best option if site is only a local copy for testing)

2) look for similar in your .htaccess file and either comment it out or delete it:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://sitename.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://sitename.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.sitename.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.sitename.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|zip)$ - [F,NC]

Now if I could only get all those hours back and replace all the pulled out hair! Good luck and hope this helps!

Re: could not load jpg, gif files.

PostPosted: 12. July 2009 15:45
by hanpedro
Thanks a lot!!

Solved.