I had an interesting issue hit my site recently, that I still can’t figure out WHY it happened, but after a few days of troubleshooting, I have figured out what happened, and how to fix it.
First, let me say that my site runs on a Mac Mini running Mavericks (10.9.5). So, all of this MAY come down to some update Apple released recently, I’m really unsure. I also run my site behind Cloudflare, which I also was curious about. It seems to have cropped up on/around the time WordPress 4.2 was released, which is what I thought the issue was at first (and why I was involved in the wordpress.org forum thread here). The issue is basically that WordPress, in my case, wouldn’t generate thumbnails for JPG image uploads, but PNGs would. The issue cropped up right around the time that wordpress 4.2 was released, so the natual causation logic seemed to point to WordPress being the issue. Interestingly, it wasn’t. After banging my head on this for a while, a coworker finally found a note that WordPress defaults to using ImageMagick (imagick.so) for image processing if it’s present, otherwise it uses GD. So, I found a “plugin” that forces WordPress to use GD, and that fixed it. So crap, the issue is my ImageMagick install. The problem is, WordPress is failing silently, and not throwing ANY errors.
So, I added a simple script to test imagick using some code I found on php.net hoping it would actually throw an error. And it did throw an error:
PHP Fatal error: Uncaught exception 'ImagickException' with message 'Wrong JPEG library version: library is 70, caller expects 90
There we go. So, the issue is ImageMagick is being compiled against libjpeg version 9, but when it’s going to run, it’s being handed version 7. So, I was able to do an “mdfind” and see I had version 9 and 8 installed, as well as 7, both in /usr/local/lib, and with my PHP install. So, knowing I installed both 8 and 9, I removed 8 and 9, so only 7 was avaible, and then recompiled ImageMagick, and uninstall and reinstall imagick.so. Then, I ran my test, and it worked!
I recently installed the “new” version of phpmyadmin, and noticed that it didn’t work (in Chrome or Firefox, but did work in Safari). After a fair amount of troubleshooting, I found there’s a setting in config that is:
Having just gotten a replacement battery for my Smart-UPS 1400, I went to replace the battery, only to have the UPS randomly shutdown. I had had this issue before where if you removed the front panel and metal plate, the UPS would randomly turn off and on again. Figuring it was some cold solder joint, to bad ribbon cable between the front panel and UPS, I took everything apart to troubleshoot. Sadly, I couldn’t find the issue. I did decide to figure out why the battery never seemed to seat fully, and really, it’s due to bad design on APC’s part. The terminal connector for the battery is supposed to neatly fall into a recessed area of the chassis, and lay flat enough for the battery to seat. 9/10 with my unit though, the terminal would end up sideways, and prevent the battery from fully inserting. Worse, and this is why the unit was turning off, when this happened, and you tried to press the battery all the way back, one of the standoffs holding the PCB to the chassis would tweak enough to cause some board fault, and shut down (I haven’t dug further, I just saw the tweaking happening when the UPS case was removed).