TAG: Fix

How to Fix ‘Converter Failed to Save File’ with Excel 2016

I recently upgraded to Office 2016 on my Windows 10 desktop and was getting the error “Converter failed to save file” when double clicking on the file along with an “There was a problem sending the command to the program error” every time. I finally had enough with the annoyance to troubleshoot it and figured out a solve.

If you have the same issue, here’s how to fix it:

  1. Open your Default Programs configuration from the Control Panel. On Windows 10, you can hit start, type Default Programs, and it’ll open the app.
  2. Scroll down the list until you get to the Excel formats (XLS):
    Default Programs
  3. If you see anything other than Excel as the default, you’ll need to change the default to Excel. For me, the issue was the Open XML Converter not being installed anymore after upgrading to 2016. To change the default, select the format, click the “Change Program” button and select Excel 2016 from the list of apps that pops up and click OK to set the association:
    App Select
  4. You’ll need to do this for each format in the list to correct it. The most common formats you’ll use are XLS, XLSX, & XLT.

ReportCrash High CPU & How to Disable reportcrash in Mac OSX

For a while now, all of my MacBooks have run extremely hot and the fans have gone nuts. While troubleshooting the issue, Activity Monitor showed that an app named reportcrash has run very high on the CPU and has killed my battery life. Force quitting the app didn’t help as it would start right back up in a few seconds and climb back to 80-100% usage of the CPU.

What is CrashReporter?

CrashReporter runs in any time an application crashes and it’s designed to saves the application state to aid developers in working out why the app crashed. Basically a process is launching, crashing (and invoking CrashReporter) and then re-launching, repeating this cycle never ending.

How to Identify What’s Crashing

To show which process is triggering this cycle and stop it, CrashReporter is pretty verbose in its logging which makes finding the problem app somewhat easier. Open up the console.app (/Applications/Utilities/Console.app) and look towards the end of your system.log to see what app is crashing.

Unfortunately for me, the problem is a driver by some company called EFI and getting the latest drivers didn’t resolve the issue. The next obvious solution was to disable reportcrash.

How to Disable ReportCrash

Fire up terminal and run the following commands to disable reportcrash:

How to Enable ReportCrash

If you need to reenable crash report, run the following commands in terminal:

Cheap Macbook Pro Docking Solution for about $30

I typically prefer developing on my desktop and large dual screen monitor setup as opposed to my Macbook. Recently, I’ve gotten into more PHP development and developing on the Mac is proving to be a more enjoyable experience only because Windows is still a second class citizen for most PHP libraries/tools. I still wanted a larger screen setup, so I considered buying a docking station to hook up to a larger monitor but I soon learned they feature the ‘Mac Penalty’ in that they cost more than they should just because it’s for Apple products.

I already have two large monitors and figured my Macbook could serve as third screen. Then I did some thinking and realized I could use one of the monitors for both computers. Assuming you have two HDMI screens already hooked up to your desktop, this would save you $150+ and still allow you to be more productive.

  1. Get a copy of Synergy (http://symless.com/) for $10. It’s open source and can be built if you have the time, but a one time fee of $10 saves me the hassle of doing so. With this, you can share your desktop keyboard across all your computers with the one license and it’s cross platform so Linux support is included too.
  2. Purchase an auto HDMI switcher. I purchased the PORTTA PET0301S 3×1 Port HDMI Switch/Switcher for about $9.
  3. Be sure to get 2 HDMI cables if you don’t already have them on hand. I don’t like the Amazon Basic brand for these as I’ve had problems with the Mac and those cables hooking up to larger screens.
  4. Install Synergy on the desktop as a server. Install on the Macbook as a client and it should autoconnect.
  5. Plug the HDMI cable from the computer into the HDMI switcher, and plug the spare into the Macbook pro. Plug the “Out” end into the monitor.

When you plug your HDMI cable into the Macbook, the HDMI switcher will automatically switch to it and project the Macbook. Synergy will auto-connect as long as it’s running on both and you can share the mouse and keyboard between both and work seamlessly.

If you have an iPad and want to turn that into an additional screen, grab a copy of Duet Display on your desktop/Macbook and install on your iPad for $15.99, and viola, instant portable second screen!

How to repair permissions on Linux Apache /var/www/html folder

I recently ran into an issue where I could no longer FTP files to my Linux droplet when multiple users were uploading to the server. The server kept the user as the owner despite me setting them in the www-data group. This fix comes from my ex-boss, James Tomasino who was kind enough to provide some help since I was stumped. I’m sharing in case anyone else runs into the same issue and finds it useful.

You’ll need to fire up terminal, ssh to the server, and then execute these commands:

+s makes permissions sticky so that all files will inherit from the parent directory. This was the setting I was missing.

Open up /etc/ssh/sshd_config. I use nano so:

Hit CTRL+W and look for “subsystem” which is typically located near the bottom of the file. Change

to

If you already have files in the html folder, you’ll want to run these commands to reset the permissions:

 

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 – error

I recently got handed a new Ubuntu droplet at work to setup and work on. I was going through the typical configuration to lock down the server and go to installing Apache when I suddenly ran into the error

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 – error

I was a little surprised considering I had only run 4 commands total on a brand new installation. If you’re getting this error like me, you’ll need to find out what’s being bound to port 80 and then stop it. Use this command to get a list of anything that’s running on port 80.

For me, it turned out nginx was running and bound to port 80. If you have the same problem, run this command to stop it:

Now you should be able to start apache.

How to Copy and Paste into the Digital Ocean VNC Console

I recently signed up for Digital Ocean to test droplets for my development and linux management testing. I was securing the server and setup fail2ban, disabled the root login, and created a user account but forgot to change the user name from root to the user name I selected in my SSH client profile. I ended up locking myself out of the server and had to resort to logging into the admin panel on Digital Ocean’s website and use their browser embedded VNC client to restore my access. I quickly discovered that one of the downsides of using this panel is that you can’t copy and paste commands. Luckily there’s a workaround and you can use the browser console to do sendkeys through Javascript.

Bring up the console in the browser developer tools. Here’s a cheat sheet for keyboard shortcuts:

BrowserDescriptionWindowsMac
ChromeOpen Developer Tools and bring focus to the consoleCtrl + Shift + JCmd + Opt + J
FirefoxOpen ConsoleCtrl + Shift + KCmd + Opt + K
Internet ExplorerAfter hitting F12, you have to click the console tab.
There’s no direct shortcut to the console tab.
F12N/A

Paste this snippet into the textbox in the console window:

Chrome console

 

Update 9-21-16

Ruden and Sebastiaan’s pointed out there was a bug in the code above. This updated snippet has support for characters when using shift characters like !@#$%^&*()_+

You’ll receive a dialog prompt to enter the copy to paste in. Please note that you need to click on the VNC console and hit enter to execute the command.

Javascript Prompt

 

 

 

 

 

If you need to enter more than one command, just hit the up arrow on your keyboard in the console to get the script again for easy reuse.

How to fix “hacked by Moroccanwolf” WordPress site

A client of mine had their wordpress hacked and when you would load the site, it would simply display a message that said “hacked by Moroccanwolf”. I did some digging and luckily it wasn’t a major hack and they didn’t mess with the posts or other settings as a lot of the hacks do.

Quick Fix

  1. To fix it, you’ll need to connect to your database using an editor of some sort, such as PHPmyadmin.
  2. Once logged in, expand your database on the left.
  3. Click on ‘wp_options’.
  4. On the top right, click the ‘Browse’ tab.
  5. Look for ‘widget_text’ in the option_name field. (For my client, it was at row 90). You should see something similar to this:

Delete the entire tag and this  should restore your website. Now remember to change your logins and update wordpress.

How I Figured it Out

Most of the hacks I’ve seen are done through injecting javascript into the database somewhere which either force a redirect or something along those lines. Here’s the steps I followed to find it:

  1. To fix it, you’ll need to connect to your database using an editor of some sort, such as PHPmyadmin.
  2. Once logged in, click on your database on the left. Ensure you’re on the database and not a table.
  3. Click Export.
  4. Leave it to quick and click go.
  5. You should now see a textbox with a mess of SQL commands.
  6. Copy and paste into your favorite editor,
  7. Search for <script> and you should find something that doesn’t belong.  In this instance, that was the only thing I found of note.
  8. You’ll want to scan the rest of the database for things that don’t belong. Additionally, you’ll want to replace all the wordpress files and confirm no .htaccess files were created that give hackers write access.

 

When updating Office 2011 for Mac, you are prompted that you must close “Microsoft Database Daemon” and “SyncServicesAgent”

If you’re trying to update your install of Microsoft Office 2011 for Mac, you may get the following message:

“These applications must be closed before the software can be installed:

Microsoft Database Daemon
SyncServicesAgent

Close these applications and try again”

If you try to kill the apps using activity monitor, you’ll find they keep getting restarted. The only way I found that worked to stop them is by following the instructions below.

  1. Open a terminal window and enter the following command:
    launchctl unload ~/Library/LaunchAgents/com.microsoft.LaunchAgent.SyncServicesAgent.plist

This will unload the SyncServicesAgent. Unfortunately the Daemon kept running for me after the latest update. To stop that, do the following:

  1. Open activity monitor
  2. Scroll down until you find Microsoft Database Daemon in the list of active applications.
  3. Click on Microsoft Database Daemon and click on the Quit Process button in the toolbar

Go back to the install utility and you should now be able to proceed with the install. Once the install is finished, you’ll want to restart the Sync Services Agent, so do the following:

  1. Go back to the terminal window and enter this command:
    launchctl load ~/Library/LaunchAgents/com.microsoft.LaunchAgent.SyncServicesAgent.plist

Now you should be all set with updates and can close terminal.

 

Visual Studio 2013 package did not load correctly

Visual Studio Error MessageToday I loaded up Visual Studio to continue work on a project and created by a random bunch of errors. All were complaints that various packages could not be loaded. The one I captured was:

The ‘JavascriptWebExtensionsPackage’ did not load correctly.’ The problem may have been caused by a configuration change or by the installation of another extension.

I had just installed SyncFusion’s Essential Studio which apparently screwed something up. I tried doing a repair on Visual Studio which unfortunately did not work.

I was able to fix it by following these steps:

  1. Close Visual Studio Open the *Users*\AppData\Local\Microsoft\VisualStudio\12.0\ folder
  2. Rename the ComponentModelCache folder
  3. Restart Visual Studio.

Visual Studio should now rebuild the cache and no longer display the error messages.

How to Get Browser Name and Version via JavaScript

Today I ran into a strange issue where Firefox version 28 and below rendered style widths different than Firefox 29 and above. Firefox 29 and above appear to have fixed the issue and render sizes to match Chrome/IE8+/Opera/Safari. Unfortunately, as old as Firefox 28 is, our client’s legal review team is stuck on that version as IT refuses to let them upgrade. As such, we needed to add a kludge fix to the site to add a style to fix the issue for those running older Firefox versions. JQuery removed the version support from version 1.9 so here’s a handy script that will allow you to detect the browser and version without any extra dependencies.

Usage is very simple:

BONUS: If you need to detect a specific version and add special classes, here’s a quick snippet that will allow you to add a class to the HTML tag  using plain old vanilla.js.