Out of Control

Fix for “User Access Manager” for WordPress

If you happen to be using the "User Access Manager" in your WordPress install, and you are using Permalinks, then you will need this fix. Without it, the redirect for logged out users won't work, and they'll end up on a 404 page.

Installing Majordomo on a cPanel box with Exim

I've posted this how-to simply as a way to remember how I did this. For all those that want to use Majordomo mailing list app on a cPanel box, while running Exim, here is no frills tutorial. I've used this on several boxes over the last five years without issue. The setup allows you to manage individual lists by domain. Each of your accounts can have their own majordomo lists. There is no control panel for this setup, and all the editing takes place on the commend line. Hope someone finds it useful.

Installing Node.js and Python 2.7 on cPanel with a unique IP address

This is a small tutorial or how-to on how to install node.js on a cpanel box. Note to all that setting up an EC2 instance on Amazon and getting Node.js up and running was WAY easier than doing this on a cPanel box.

First lets install bzip2-devel with yum:

yum install bzip2-devel 

First we need to install an alternate version of Python. We’ll install Python 2.7 and put it in /opt.

cd /usr/local/src
wget http
://python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -zxvf Python-2.7.3.tgz
cd Python
-2.7.3
./configure --prefix=/opt/python2.7 --with-threads --enable-shared
make
make install
ln 
-/opt/python2.7/bin/python /usr/bin/python2.7
echo '/opt/python2.7/lib'>> /etc/ld.so.conf.d/opt-python2.7.conf
/sbin/ldconfig 

(Thanks to this site for giving this part of the tutorial).


Best to test it actually worked and that bz2 can be found, before we continue:

cd /opt/python2.7/bin
./python -"import bz2; print bz2.__doc__"

The python bz2 module provides a comprehensive interface for
the bz2 compression libraryIt implements a complete file
interface, one shot (de)compression functions, and types for
sequential (de)compression

If you see what is above, then python works and bz2 can be found! Now let’s set our PATH environment so that we can see the new python from our shell. Add the follow line to the end of your ~/.bashrc file:

export PATH=/opt/python2.7/bin:$PATH 

Now run source ~/.bashrc to load up the change:

source ~/.bashrc 

You should be able to find the new python now with this:

# which python
/opt/python2.7/bin/python 

Now, let’s get node.js installed:

cd /usr/local/src
git 
clone http://github.com/joyent/node.git
cd /node 

More than likely you will need to edit the ./configure file to change the environment from the old crusty cpanel 2.4 to your shiny new Python 2.7 version in the first line. Change:

#!/usr/bin/env python
to
#!/usr/bin/env python2.7 

Now we can build node:

./configure
make
make install 

If you are installing a newish version of Git have an older version of GCC, you may need to apply this patch. The error I got from this little bug was:

unrecognized command line option "-Wno-old-style-declaration" 

Next up, lets make sure we have a unique IP on our box to run node from, so we don’t have to use alternate ports nor create a proxy. You do this by using the Apache Configuration -> Reserved IPs Editor in cPanel. Set one of your IP’s to reserved so that Apache won’t listen to it anymore. Let’s say for example you have IP address 111.111.111.111 in your list, and you want Node.js to use this instead of Apache. Simply check the box beside 111.111.111.111 Reserved and click on Save. You will be asked to rebuild apache, which is fine and only takes a few seconds.

Now we can setup a Node.js server and see if it works from our browser! Create a folder somewhere on your server where you can create your Node server and files. Then create a file called server.js and put the following into it, making sure to change the IP address 111.111.111.111 to the one you reserved in cPanel:

var http = require("http");

function 
onRequest(requestresponse{
  console
.log("Request received.");
  
response.writeHead(200{"Content-Type""text/plain"});
  
response.write("Hello World");
  
response.end();
}

http
.createServer(onRequest).listen(80'111.111.111.111');

console.log("Server has started."); 

(Thanks to this site for an excellent tutorial on learning Node.js).

Now launch the node.js server:

# node server.js 
Server has started

If you see the above, then you can test the server by going to your IP address in your browser. When you load the page in your browser you should see “Request received.” in your shell. You’ll note that you see it twice, this is due to the fact that one is when your browser looks for a favicon. This is all explained and a lot more in the Node.js tutorial linked just above.

There you have it, Python 2.7 and Node.js should now be running on a unique IP address on a cPanel box on port 80. Let me know if you have questions, but due to a lack of time I might not be of much help. All of the above was found simply by using Google.

Failed to parse (PNG conversion failed; check for correct installation of latex, dvips…

If you are planning on using Math in mediawiki, and you have everything installed (Math, math, texvc, latex, dvipng) but you still get the error:
Failed to parse (PNG conversion failedcheck for correct installation of latexdvipsgs, and convert
There is one last step that might need to be done. You will need to generate a latex.fmt file.You can do this with the command:
fmtutil-sys --all 
There is a good conversation about it over here.

FTP doesn’t work on server using AFP

Although you should NOT be using FTP, if you need to for some reason, like we did on one server, and some people can't upload files, this might be the issue. We run APF firewall on some servers. A couple of servers have either ProFTP or Pure-FTP installed. Over the last couple of weeks we discovered that some people could not read or write with their FTP client when ftping into our servers. If you experience this, check that MONOKERN is off.
SET_MONOKERN="0" 
This is set in /etc/apf/conf.apf Good luck!

Page 1 of 28 pages  1 2 3 >  Last ›