rothkj1022 / phppickem

PHP Pick 'Em is a free php web application that allows you to host a weekly NFL pick 'em football pool on your website.
MIT License
30 stars 57 forks source link

svg files not rendering and coming up as Type text/plain #24

Closed savagegeek closed 8 years ago

savagegeek commented 8 years ago

Current server settings...

Linux web01.savagegeek.com 2.6.18-411.el5xen #1 SMP Mon Jul 11 18:35:26 CDT 2016 i686 i686 i386 GNU/Linux

rpm -qa | grep http httpd-2.2.3-92.el5.centos

cat /etc/redhat-release CentOS release 5.11 (Final)

I noticed that the required parameters are already in .htaccess

AddType image/svg+xml svg svgz AddEncoding gzip svgz

But, the logo's that are of extension .svg still do not render

rothkj1022 commented 8 years ago

You may need to move your mime type settings to your apache settings if it's not picking it up from .htaccess. Make sure you then restart apache.

Also, double check your headers on the SVG images to confirm you're getting the correct mime type served: https://css-tricks.com/snippets/htaccess/serve-svg-correct-content-type/

On Fri, Aug 5, 2016 at 8:03 AM savagegeek notifications@github.com wrote:

Current server settings...

Linux web01.savagegeek.com 2.6.18-411.el5xen #1 https://github.com/rothkj1022/phppickem/pull/1 SMP Mon Jul 11 18:35:26 CDT 2016 i686 i686 i386 GNU/Linux

rpm -qa | grep http httpd-2.2.3-92.el5.centos

cat /etc/redhat-release CentOS release 5.11 (Final)

I noticed that the required parameters are already in .htaccess

AddType image/svg+xml svg svgz AddEncoding gzip svgz

But, the logo's that are of extension .svg still do not render

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rothkj1022/phppickem/issues/24, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhKHzTRjg3jNHJOOoD4Tz2x5waIDUokks5qczSegaJpZM4JdqS4 .

savagegeek commented 8 years ago

ok, Thanks. I have tried this and used resource http://linuxtoolkit.blogspot.com/2014/09/adding-svg-mime-type-to-apache-on-centos.html

but to no avail the svg file still doesn't render... So what is the difference between the png files and svg files for the small images? If it's a big deal, then I will just upgrade to Centos 7.x and hope for the best because I guess Centos 5.11 is not doing so hot for me at the moment.

savagegeek commented 8 years ago

I upgraded to a new server running Centos 7. Svg files no longer having an issue.