cPanel Apache error: must be installed for pthread_cancel to work

The other day I ran into the error “ must be installed for pthread_cancel to work.” Apache on this cPanel server would produce “Internal Server 500″ for any web page. When I checked the /usr/local/apache/logs/error_log, I found the following entry:

[Thu Jul 17 03:51:41 2014] [error] [client] must be installed for pthread_cancel to work
[Thu Jul 17 03:51:41 2014] [error] [client] Premature end of script headers: index.php
[Thu Jul 17 03:51:42 2014] [error] [client] must be installed for pthread_cancel to work
[Thu Jul 17 03:51:42 2014] [error] [client] Premature end of script headers: index.php
[Thu Jul 17 03:51:42 2014] [error] [client] must be installed for pthread_cancel to work

The fix was only a Google search away. cPanel’s own forum had the fix here. I’ve consolidated the fix into a short shell script that you can just copy and paste. But first, understand what it does. In WHM, you can go to Home » Service Configuration » Apache Configuration » Memory Usage Restrictions and setup Resource Limits (RLimitMEM and RLimitCPU) to, well, limit CPU and memory resources.

The problem comes when sometimes, it doesn’t work as intended. So, you have to remove it. The easiest way is to edit /usr/local/apache/conf/httpd.conf, remove or comment out the RLimit lines, distill it and restart Apache. That’s what this script does, using sed to make the edit. It’s faster and it’s more precise, and it’s reversible (since I only commented out the lines rather than remove them.)

sed -i 's/^RLimit/#RLimit/g' /usr/local/apache/conf/httpd.conf
/usr/local/cpanel/bin/apache_conf_distiller --update
service httpd restart

You only need to log in to a shell prompt as root, and paste in the script. Make sure to press Enter after the “service httpd restart” to make sure Apache restarts. This should eliminate the error “ must be installed for pthread_cancel to work”.

Did this fix work for you? Share it with your friends using the link below, and leave a comment and let me know!

Mechanical Keyboard Review: Monoprice Mechanical Gaming Keyboard

Mechanical Keyboard: A long time coming (back)

That’s how I’d describe my journey to the mechanical keyboard. But before I go into that, lets back up about 20 years to the mid 90′s. Or even farther, to about 1991. I was a teenager at the time and making money refurbishing XT/AT’s and 286′s. I came across a lot of derelict machines but I always paid attention when I saw an old IBM Model M mechanical keyboard. Those things were heavy, loud, and pretty nice to type on. I wasn’t much of a touch typist back then though and didn’t really think much about them.

Eventually I quit seeing those in my day to day work and they somewhat faded from the scene. Fast forward to “modern” times, around 2010. The mechanical keyboard is enjoying a surge in popularity. I looked at the price of such gems as “das keyboard” and about choked. No, I can’t justify spending (or afford to spend) more than $100 on a keyboard when a $15 keyboard will suffice. But that wasn’t the end of it.

IBM Model M Keyboard

IBM Model M Keyboard

My interest was still piqued and I kept an eye out for articles. I came across this article at ARS Technica: “Why I use a 20-year-old IBM Model M Keyboard” last year and that made me wonder even more why these keybaords have such a following. I didn’t remember a mechanical keyboard as being that amazing.

Present Day

I type a lot at work. I’m now a supervisor at a really awesome web hosting company, and so I communicate with customers and also with employees and coworkers, and since I work from home, about 98% of that communication is via chat. So yeah. I type a lot these days. I’ve been using Microsoft’s “Comfort Curve 3000 for Business” for several years and have found these keyboards to be ok for the most part. I like the ergonomics of them and they generally work. Recently though they have not done ok. A few months ago the keyboard started getting sticky, and I attributed that to several soda and food spills over time. So, I purchased a new one. Oddly, it was the same way. I took my old one apart, lovingly washed it in the sink and let it dry and put it all back together. It was the same. Typing was becoming a real chore. So, I decided that it was time to look into a mechanical keyboard again.

I did some basic google searches and came up with this excellent guide on Reddit: “So you want to buy a mechanical keyboard” and saw an option I’d never seen before: The Monoprice Mechanical Gaming Keyboard. I checked the site, and it was only $60! I had been researching standard keyboards from Logitech and they were in the $45 range, and so this mechanical keyboard was hardly a stretch. And, it wasn’t over $100 like many others.

It got great reviews at Monoprice, so I went ahead and plunked down the cash. On checkout, I saw a spot for a coupon code, and a quick Google search awarded me a 10% off coupon. With shipping I paid $61 and change. So, how is it?

The Review

UPS arrived right in the middle of a shift, and I hurredly unplugged my current Microsoft keyboard and plugged in the new Monoprice Mechanical Keyboard. The first thing I noticed: This sucker is heavy! Its not some plastic hunk of junk keyboard. It has some heft to it!

The Monoprice Mechanical Keyboard

The Monoprice Mechanical Keyboard

I had been concerned about the Cherry MX Blue switches being a bit on the loud side, but the clickety-click of my typing is not bad at all. In fact, my wife is a little jealous of it. That’s a good thing- I was worried it would annoy her to death, since my office is in our bedroom.

Typing is very nice. The best part is that you don’t have to completely depress a key in order for it to type. And you know each time a finger triggers a key because its a real difference in feel when the key actually engages. The spring that holds it up gives way in a very distinct way (its called a Collapsing Spring mechanical keyboard for a reason) and its quite pleasant to type on. I find myself floating along the keys rather than pounding them. Gone is that sticky feeling of the Microsoft keyboard.

The only negative thing about this mechanical keyboard is that because it is marketed to gamers, it has blue LED’s for Num Lock, Caps lock and Scroll lock. You know, those blue ones that light up a whole room at night. I often work in low light and found them to be quite distracting. My solution? Some electrical tape over the lights, with a small notch cut out so that just a little bit of light peeks through. Even so, I have to make sure that the Num Lock is turned off at night or there is a huge blue spot on the ceiling.

Overall I’m very happy with my purchase. I’ve never shopped at Monoprice before and so it was good to be exposed to another vendor that I can use in the future. The mechanical keyboard is great and is honestly everything I though it would be. I hope you enjoy yours!

© Ryan's Techs Tidbits