Unknown type: application/octet-stream on every image
-
Hi there
I have used the plugin on other sites previously without any issue, fantastic tool that has helped pagespeed no end. However, I’m running into trouble on my current project and get this message with every single attempt at optimizing:
Unknown type: application/octet-stream
Please help me out – the site I’m working on is in desperate need of image optimization!
The site is running on a VPS that I have full access to via control panel and FTP.
Thanks again
John
-
Sounds like mimetype detection is not configured properly for php, and so everything is coming back as application/octet-stream. Quite strange, but possible. Hard to say what the fix is in your particular case without either the plugin status or debug information.
Ok, so here’s the debug info:
Debug Log</p> <p>gilesadmin<br /> EWWW IO version: 202<br /> WP version: 4.0<br /> ewww_image_optimizer_admin_init()<br /> ewww_image_optimizer_init()<br /> ewww_image_optimizer_cloud_init()<br /> ewww_image_optimizer_exec_init()<br /> ewww_image_optimizer_install_tools()<br /> Checking/Installing tools in /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/<br /> wp-content/ewww permissions: 0755<br /> ewww_image_optimizer_install_paths()<br /> CPU architecture: i686<br /> generated paths:<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/jpegtran-linux<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/optipng-linux<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/gifsicle-linux<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/pngquant-linux<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/cwebp-linux8<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp<br /> ewww_image_optimizer_md5check()<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp-alt: 9429dd850cc2f976961de5fe61f05e97<br /> Linux/UNIX style OS, checking permissions<br /> jpegtran permissions: 0755<br /> gifsicle permissions: 0755<br /> optipng permissions: 0755<br /> pngquant permissions: 0755<br /> webp permissions: 0755<br /> ewww_image_optimizer_settings_script()<br /> images to check for savings: 0<br /> ewww_image_optimizer_notice_utils()<br /> ewww_image_optimizer_exec_check()<br /> disable_functions =<br /> suhosin_blacklist =<br /> ewww_image_optimizer_safemode_check()<br /> safe_mode =<br /> ewww_image_optimizer_path_check()<br /> found /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran, testing...<br /> ewww_image_optimizer_md5check()<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran: 8e4a09bb04ba001f5f16651ae8594f7f<br /> ewww_image_optimizer_mimetype()<br /> testing mimetype: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran<br /> finfo_file: application/octet-stream<br /> ewww_image_optimizer_tool_found()<br /> testing case: f at file<br /> file: magic file from /usr/share/file/magic<br /> file binary found<br /> file command: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped<br /> ewww_image_optimizer_tool_found()<br /> testing case: j at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran: Independent JPEG Group's JPEGTRAN, version 9a 19-Jan-2014<br /> optimizer found<br /> found /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng, testing...<br /> ewww_image_optimizer_md5check()<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng: 31698da4f5ca00b35e910c77acae65bb<br /> ewww_image_optimizer_mimetype()<br /> testing mimetype: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng<br /> finfo_file: application/octet-stream<br /> ewww_image_optimizer_tool_found()<br /> testing case: f at file<br /> file: magic file from /usr/share/file/magic<br /> file binary found<br /> file command: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, not stripped<br /> ewww_image_optimizer_tool_found()<br /> testing case: o at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng: OptiPNG version 0.7.5<br /> optimizer found<br /> found /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle, testing...<br /> ewww_image_optimizer_md5check()<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle: 58f42368e86a4910d101d37fee748409<br /> ewww_image_optimizer_mimetype()<br /> testing mimetype: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle<br /> finfo_file: application/octet-stream<br /> ewww_image_optimizer_tool_found()<br /> testing case: f at file<br /> file: magic file from /usr/share/file/magic<br /> file binary found<br /> file command: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, not stripped<br /> ewww_image_optimizer_tool_found()<br /> testing case: g at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle: LCDF Gifsicle 1.84<br /> optimizer found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at pngout<br /> pngout: sh: pngout: command not found<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at /usr/bin/pngout<br /> /usr/bin/pngout: sh: /usr/bin/pngout: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at /usr/local/bin/pngout<br /> /usr/local/bin/pngout: sh: /usr/local/bin/pngout: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at /usr/gnu/bin/pngout<br /> /usr/gnu/bin/pngout: sh: /usr/gnu/bin/pngout: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at /usr/syno/bin/pngout<br /> /usr/syno/bin/pngout: sh: /usr/syno/bin/pngout: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at pngout-static<br /> pngout-static: sh: pngout-static: command not found<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at /usr/bin/pngout-static<br /> /usr/bin/pngout-static: sh: /usr/bin/pngout-static: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at /usr/local/bin/pngout-static<br /> /usr/local/bin/pngout-static: sh: /usr/local/bin/pngout-static: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at /usr/gnu/bin/pngout-static<br /> /usr/gnu/bin/pngout-static: sh: /usr/gnu/bin/pngout-static: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: p at /usr/syno/bin/pngout-static<br /> /usr/syno/bin/pngout-static: sh: /usr/syno/bin/pngout-static: No such file or directory<br /> tool not found<br /> found /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant, testing...<br /> ewww_image_optimizer_md5check()<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant: 46bb066d676bf94cbfd78bdc0227e74e<br /> ewww_image_optimizer_mimetype()<br /> testing mimetype: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant<br /> finfo_file: application/octet-stream<br /> ewww_image_optimizer_tool_found()<br /> testing case: f at file<br /> file: magic file from /usr/share/file/magic<br /> file binary found<br /> file command: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, not stripped<br /> ewww_image_optimizer_tool_found()<br /> testing case: q at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant: 2.3.0 (July 2014)<br /> optimizer found<br /> found /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp, testing...<br /> ewww_image_optimizer_md5check()<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp: 62272b2bd33218664b2355f516b6e8fc<br /> ewww_image_optimizer_mimetype()<br /> testing mimetype: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp<br /> finfo_file: application/octet-stream<br /> ewww_image_optimizer_tool_found()<br /> testing case: f at file<br /> file: magic file from /usr/share/file/magic<br /> file binary found<br /> file command: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.26, dynamically linked (uses shared libs), not stripped<br /> ewww_image_optimizer_tool_found()<br /> testing case: w at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory<br /> tool not found<br /> found /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp-alt, testing...<br /> ewww_image_optimizer_mimetype()<br /> testing mimetype: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp-alt<br /> finfo_file: application/octet-stream<br /> ewww_image_optimizer_tool_found()<br /> testing case: f at file<br /> file: magic file from /usr/share/file/magic<br /> file binary found<br /> file command: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp-alt: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped<br /> ewww_image_optimizer_tool_found()<br /> testing case: w at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp-alt<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp-alt: 0.4.1<br /> optimizer found<br /> using: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran<br /> using: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng<br /> using: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle<br /> using: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant<br /> using: /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp-alt<br /> ewww_image_optimizer_options()<br /> ewww_image_optimizer_install_paths()<br /> CPU architecture: i686<br /> generated paths:<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/jpegtran-linux<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/optipng-linux<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/gifsicle-linux<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/pngquant-linux<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/plugins/ewww-image-optimizer/cwebp-linux8<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/pngquant<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/cwebp<br /> ewww_image_optimizer_tool_found()<br /> testing case: j at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/jpegtran: Independent JPEG Group's JPEGTRAN, version 9a 19-Jan-2014<br /> optimizer found<br /> ewww_image_optimizer_tool_found()<br /> testing case: o at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/optipng: OptiPNG version 0.7.5<br /> optimizer found<br /> ewww_image_optimizer_tool_found()<br /> testing case: g at /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle<br /> /var/www/vhosts/gilestravel.com/httpdocs/wp-content/ewww/gifsicle: LCDF Gifsicle 1.84<br /> optimizer found<br /> ewww_image_optimizer_safemode_check()<br /> safe_mode =<br /> ewww_image_optimizer_exec_check()<br /> disable_functions =<br /> suhosin_blacklist =<br /> ewww_image_optimizer_gd_support()<br /> GD found, supports:<br /> GD Version: bundled (2.1.0 compatible)<br /> FreeType Support: 1<br /> FreeType Linkage: with freetype<br /> T1Lib Support: 1<br /> GIF Read Support: 1<br /> GIF Create Support: 1<br /> JPEG Support: 1<br /> PNG Support: 1<br /> WBMP Support: 1<br /> XPM Support: 1<br /> XBM Support: 1<br /> JIS-mapped Japanese Font Support:<br /> ewww_image_optimizer_tool_found()<br /> testing case: i at convert<br /> convert: sh: convert: command not found<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: i at /usr/bin/convert<br /> /usr/bin/convert: sh: /usr/bin/convert: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: i at /usr/local/bin/convert<br /> /usr/local/bin/convert: sh: /usr/local/bin/convert: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: i at /usr/gnu/bin/convert<br /> /usr/gnu/bin/convert: sh: /usr/gnu/bin/convert: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: i at /usr/syno/bin/convert<br /> /usr/syno/bin/convert: sh: /usr/syno/bin/convert: No such file or directory<br /> tool not found<br /> ewww_image_optimizer_tool_found()<br /> testing case: n at nice<br /> nice: 0<br /> nice found<br /> ewww_image_optimizer_jpg_background()<br /> ewww_image_optimizer_jpg_background()<br /> ewww_image_optimizer_jpg_quality()
Hiya – just wondered if you’d had a chance to look at the debug info above – got to be honest, it means nothing to me!!
Thanks again
Hi there
Sorry to keep bumping my own thread, but thought it might be useful to know that the plugin isn’t working on any of the sites on my VPS server now, even though it had definitely been working on a couple of them in the past. Are there any server specific issues that could result in the above debug?
That sounds suspiciously like an upgrade broke the mimetype detection. It could have been php itself, or one of the mimetype utils.
Two more things that will help:
1. a screenshot of the above message about ‘unknown type: application/octet stream’
2. a screenshot of your plugin status
3. look and see if there is an actual file in the ewww-image-optimizer folder called debug.log, and send that to me at https://www.shanebishop.net/contact-me/
Hi and thank you – I’ve sent you the requested bits through the contact form.
The hosts of the VPS have installed ImageMagik but its not made a difference. I’d be interested to hear what’s happening here, as it does seem to affect all sites on the server.
Thanks again
John
Yeah, that has nothing to do with imagemagick, it has to do with the ‘magic’ file that the various mimetype functions and utilities use to identify what types of files we are working with. It isn’t really magic, it just contains file signatures for various filetypes. Are these managed, or unmanaged VPS systems?
Its a managed VPS that hosts a number of our sites. Did you receive the screens/debug log? Thanks again
PS – we have access to the VPS via Plesk
Yes, I received the info you sent, it makes it obvious that the mimetype detection is totally broken, as it is saying every file is of type application/octet-stream. This is something you can only fix with root level ssh access. At this point, I will tell your webhost that they have broken the mimetype database (magic file) for the finfo_file function in php, and ask them to fix it. If they cannot, find a new webhost. While this may seem like a minor thing, it is also something any competent server admin should be able to fix.
Thanks – I’ll pass on your comments and direct them to this thread. Since it was working previously, obviously something needs fixing. I’ll let you know the result.
Hi again! So the hosts have got back to me and advised an upgrade to php 5.4 should fix the problem? My only concern is whether this will have adverse affect on anything else related to wordpress or other plugins. The sites we run are all wordpress based. Any ideas?
Thanks again
I don’t run anything on php 5.3 anymore, it’s getting pretty old. I know wordpress itself won’t have issues, but there is always the slim possibility that a plugin will, but that would have to be a very poorly maintained plugin. I would give it a shot.
Ah, well that sounds like the issue then. I am hesitant to say the least to upgrade to php 5.4 – the VPS host’s twelve separate WordPress sites, all with different themes and plugins. I’m concerned that if I update to 5.4 there may be implications to the other sites. Is there any sort of pre-upgrade validation service that I can use to check the sites? Our hosts have said the upgrade is irreversible and therefore if something does go haywire I have no safety net!
I found this, but you would need full root access to your VPS to use it I think: https://blog.nerdery.com/2013/11/code-compatible-php-5-4-5-5/
Your webhost might be able to tell you whether or not there is a way to run that without root access.
I know it probably sounds a bit idealistic, but if your plugins aren’t compatible with php 5.4, I would disable them until the plugin authors fix them. If they have been actively maintained (updates within the last year or two), they should be compatible with 5.4. Do some poking around on the plugin pages and the support forums for each of the plugins that you use on your sites to get a better feel for things. If they don’t work on php 5.4 I would expect to find support threads related to the issues.
- The topic ‘Unknown type: application/octet-stream on every image’ is closed to new replies.