Enabling Memcached in XenForo with Unix sockets

OK, I have always had an issue with getting XenForo to play nice with Memcached, but that was the case when trying to use it on managed servers with no root access.

Prerequisites:  in addition to installing memcached, you must have both memcache and memcached PHP extensions installed.  In Ubuntu,

apt-get install php5-memcache
apt-get install php5-memcached

For whatever reason, Zend needs both installed for this to work.

You must also configure memcached on your server to run with a socket, vs. localhost with port 11211.  This is quite simple.

Create a directory (such as /var/memcached ) and chown it to your memcache user.

In memcached.conf, comment out these lines:

# -p 11211
# -l

…and add these lines:

-s /var/memcached/memcached.socket
-a 0766

Make certain you also have your memcache user specified in the file:

-u memcache

What you’ve just done is disable the tcp service but enabled the Unix socket.  Good work.

Now it’s time to change your configuration file in XenForo.

First, make sure you have the frontend cache configured:

$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['cacheSessions'] = true;
$config['cache']['frontendOptions'] = array(
 'caching' => true,
 'automatic_serialization' => true,
 'lifetime' => 3600,
 'cache_id_prefix' => 'xf_myforum_'

Using the examples above, you’ll want to add this below:

$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
 'compression' => false,
 'servers' => array(
 array( 'host' => 'unix:///var/memcached/memcached.socket', 'port' => 0 )

And for now, comment out your file backend config if you have been using it, and keep it in your file in case memcached ever acts up–you can quickly revert:

/* ///// Backup in case Memcache totally borks
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array(
 'cache_dir' => '/var/caches/xf/xfcache_myforum',
 'hashed_directory_level' => 2,
 'hashed_directory_umask' => 0707,
 'cache_file_umask' => 0707

If all goes well, you’ll be using memcached for XF’s cache, and also be using the faster and more direct Unix socket instead of TCP.


Posted in Xenforo | Tagged , | Leave a comment

Epson WF-3640 error 0xDE

In frustration today, I attempted to print a PDF file from Acrobat X that kept causing the Epson WF-3640 printer to throw the 0xDE error message.

The message on the panel mentioned turning off the printer.  Upon restarting, it said to run a nozzle check, which I did, and it printed perfectly. I even cleaned the print heads afterward, and yet I still kept getting the same error.  Help was nonexistent online, other than the most generic nonsense you find when trying to troubleshoot anything, including the non-answers many tech support “professionals” tend to give out.

I then printed the same PDF file from my Nexus 7.  No problem–it printed straight away.  Interesting.

Back on the computer, I tried opening up the PDF with the Windows 8 “Reader” application, and it mentioned that the file might be corrupt.  Aha!  I then generated another PDF file, and printed it with no issues.  Perfect!

Lesson: if you have a printer error that seems illogical, try a few standard error checking practices, then attempt printing perhaps a very generic document from Word, or even from a text editor, on the slim chance that you might have a corrupted document.

And please, do not let technical support at the printer company run you through the typical “reboot your computer, reinstall your drivers, run the printer self-test” merry-go-round.  You can easily troubleshoot on your own. In the future, I am considering posting some simple and logical troubleshooting guides to save end users a lot of grief.

Posted in Uncategorized | Leave a comment

Why you should AVOID WordPress 4.3!

WordPress has been helpful in many ways, allowing us to build out sites quickly and efficiently.  Yet during their “upgrades,” they often build in new features that serve to frustrate long-time users, or introduce features which make absolutely no sense.

One of the lamest developments on the Internet is something called Markdown.  What it does is allow lazy users to use characters such as #, *, >, etc. to format text.

Why is it lazy? They claim it is so their hands to not have to leave the keyboard.

Well, let me clue all of you in to something: I have used keyboard shortcuts in web-based editors for years, and they mirror keyboard shortcuts in common word processing programs we have used for nearly two decades now.  My hands do not leave the keyboard, even to submit messages in some cases, as a simple keyboard shortcut or two gets me to the “submit” button, and I’m in business.

These users are too lazy to memorize/learn these shortcuts.  They’d rather use some lame character-based formatting that comes from the trainwreck that powers Wikipedia (MediaWiki).

Google Plus has had similar editing shortcuts, and they are ultra-annoying.  I cannot even put two hyphens in a paragraph without it assuming I mean to strike out the text.

WordPress, you really need to rethink this strategy. As of yet, nobody has showed us how to deactivate this shortsighted and very frustrating feature.  When they do, I will post it here.  Until then, I will regret upgrading to WordPress 4.3 on one of my servers (which I have already done), and leave the rest at 4.2.

Even better–if someone creates a plugin to dump this nasty feature, I’ll be in full support of it.

WordPress was supposed to be smart.  This is just another case of their serially dumbing-down the product to clueless social media addicts who can’t be bothered to learn what the rest of us have known for decades.

Posted in Uncategorized | Leave a comment

Sour grapes for Mozilla? Boo hoo.

So the CEO of Mozilla is throwing a tantrum in an open letter to Microsoft. Well, boo hoo. I’m crying for you right now.

Let’s see.  If you install OSX or buy a new product with OSX install, tell me again, what is the default browser?  Yep, Safari.  You install Windows 10, like any early version of Windows, and what do you get?  Exactly. Microsoft’s browser, which this time is Edge.

So, what exactly is there to complain about?  It takes me all of two minutes to download Chrome, install it, log in to sync everything, and answer the magic question as to whether or not I want Chrome to be the default.  And even without that, I can hop to the default browser choice in Windows 10’s settings and change it within seconds–Microsoft has made it dead easy to change.

Listen, Mr. Beard, don’t presume that everyone wants your inferior browser, bloated and memory-leaking as it is.  And don’t presume that people out here are so stupid as to not know how to change a default browser.  If they want your bloody Firefox, then they’ll download it, answer the “default” question, and be on their way within minutes.

Mozilla only sees Edge as a threat to their marketshare, nothing more. And that goes back to the ancient browser wars again, something most of us outgrew a decade ago.  Stop living in the past, and go overhaul that mess you call a browser.  Clean up your own yard, Beard, before bitching about someone else’s.

Posted in Uncategorized | Leave a comment

Moving domains to Google

I started out getting my domains from InterNIC way back in the 1990s, when they were $50/year.  That later was scaled back to $35/year but was still pricey.  And, it was still a monopoly.

Once the monopoly was busted, I went with a registrar which used services from Tucows. It worked well, but it always required a prepayment; you could never have them charge a debit or credit card on file.

Due to cost, I ended up moving domains slowly over to GoDaddy.  Despite the fact that their site can be quite spammy during the checkout process, and navigation can sometimes run you in circles, I saved quite a bit of money.  Others have had issues with them but in my case, it was all pretty much easy to work with, and I never had a major issue.

About two years ago, they offered a free upgrade for domain privacy–your domain’s details would show through a proxy, as opposed to revealing your name, address and contact details to the public.  Well, the free ride on privacy only lasted a year, so I ended up having to bounce back and forth from a third party site just to get them all cancelled.

On top of it, GoDaddy quit giving discounts for renewals like they used to.  Not only that, they were adding some sort of “ICANN fee” to each domain, rather than just bury it within the cost.  A minor issue but still, I don’t know of any other registrar itemizing that line item as they do.

Enter Google Domains.  After doing some research, I found that most of my domains would transfer over for a flat $12/year.  Not a spectacular deal, but privacy is free.  So as each batch of domains has come up, I have been switching over.  Since I use Google Apps for email services on a lot of my domains, this actually may work out a bit easier.  And they have made the transfer process as simple as possible.

By the end of the year, everything should be transferred over.  There are other registrars out there, but I recommend giving Google Domains a glance before registering elsewhere, even if just for the free domain privacy service.


Posted in Networking | Leave a comment