-4

I am testing a piece of software that is working except for some SVG images that are not showing. When I preview them using Firebug in Firefox, it says "Failed to load the given URL," however, when I manually visit the image's URL, it shows just fine.

All file and directory permissions are set to 777 as advised by the software's developer, and all the files' and directories' chown settings are set to the apache group, which seems logical to me.

What am I doing wrong?

Dustin L.
  • 143
  • 3
  • 1
    If the URL works when you visit it manually the problem is likely NOT file permissions (or anything else to do with the web server). More importantly though, Unix file permissions are not some kind of black magic - there is no one setting that is universally "proper". [Take the time to understand what those numbers mean](http://en.wikipedia.org/wiki/Filesystem_permissions#Traditional_Unix_permissions), then ensure that you have set appropriate permissions based on your environment and needs. – voretaq7 May 30 '13 at 01:23
  • @voretaq7 I set them to what the developers recommended to me, and they work on my local machine, but on my server, the images do not load. – Dustin L. May 30 '13 at 01:25
  • Also, I wasn't sure if ServerFault or SuperUser would be the correct place to ask this, so my apologies if I made a mistake. – Dustin L. May 30 '13 at 01:29
  • 1
    OK, if it works one one box but not another it's time to play my favorite game -- *"What's Different?"*. (Does apache run as a different user? If this is a Linux box, is SELinux enabled and enforcing (denying access to the files)? Is there anything in your logs? etc....) – voretaq7 May 30 '13 at 01:30
  • If this is about a piece of software you're installing or maintaining as a professional, in some function related to your job (which is what it sounds like to me) you're in the right place -- you just need to do a little more legwork for us to help you. "It doesn't work" is a tough thing to troubleshoot (especially when we don't know what "it" is) – voretaq7 May 30 '13 at 01:31
  • Indeed it is related to my job. Glad I got that right, and I apologize I'm being kind of vague here. If I could give you logs I would but I wouldn't know what kind of logs to give for this issue. – Dustin L. May 30 '13 at 01:33
  • Both Apache installations are running as the same user, SELinux is disabled. – Dustin L. May 30 '13 at 01:33
  • Also, if I upload an avatar image (it's a piece of forum software) manually, it shows it. But it refuses to show the default images. – Dustin L. May 30 '13 at 01:35
  • @DustinL. Hmm... since the images you upload work, use those permissions (and ownership). Also check your Apache error logs (if the images are coming up with an error there should be *something* there indicating the problem) – voretaq7 May 30 '13 at 01:41
  • I did that a few minutes ago, trying to copy the permissions and ownership from the working files to the broken files, but to no avail. I appreciate your help. I will try to re-install the software and start from scratch. – Dustin L. May 30 '13 at 01:43

1 Answers1

0

The issue was due to Apache not serving the vector graphics properly. I fixed it by adding the following to httpd.conf:

AddType image/svg+xml svg svgz
AddEncoding gzip svgz
Dustin L.
  • 143
  • 3
  • You likely have an outdated `mime.types` file on the server. Update it from wherever you got httpd. Or grab the latest copy from the Apache foundation: http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types – Chris S Aug 02 '13 at 12:55