How to install IonCubeLoader without recompiling apache

There are two ways to install IonCubeLoader on cPanel. The standard way includes recompiling Apache using EasyApache from WHM (or shell) and it takes 10-30 minutes to complete and results in Apache restart in the end.

But there’s also a quick way: just login to SSH and execute this command, wait a minute and that’s it!

/scripts/phpextensionmgr install IonCubeLoader

Ping returns unknown host

If your server returns unknow host errors when you try to ping some website, or wget returns unable to resolve host address, it’s most probably that you don’t have a valid DNS settings in /etc/resolv.conf

wget: unable to resolve host address downloads.sourceforge.net
ping: unknown host downloads.sourceforge.net

If you’r host didn’t provided their nameservers that you can use – you can use one provided by OpenDNS.net.
All you need to do is edit file /etc/resolv.comf and add their nemeservers into the file:

nameserver 208.67.220.220
nameserver 208.67.222.222

Save the changes and you’re ready to go!
(No need to restart anything)

Disk space usage showing 0 Mb on VPS

I have just installed a cPanel on new VPS account but it’s simply not showing any disk usage even with quoatas turned on. I have tried running /scripts/fixquotas but it didn’t help and it returned error: quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option..

To make cPanel calculate disk usage you need to execute following commands:

touch /home/quota.user
touch /home/quota.group
chmod 600 /home/quota.user
chmod 600 /home/quota.group
quotacheck -acugvm

The result of the last command should look something like this:

quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/sda [/] done
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Old group file not found. Usage will not be substracted.
quotacheck: Checked 22164 directories and 750401 files
quotacheck: Old file not found.

By now it should work already but just to make sure execute quotas one more time

/scripts/fixquotas -force

That’s it!

FLV streaming using Apache + WHM/cPanel

Streaming FLV files with Apache + mod_flvx has never been easier. Setup your web server to stream FLV files using Apache in just 3 minutes.

cd /usr/local/src
wget http://people.apache.org/~pquerna/modules/mod_flvx.c
apxs -cia mod_flvx.c

If your system can’t find apxs locate it using

which apxs

You’ll get something like /usr/bin/apxs as result – that’s the path to it – you need it for next step

And then use full path to apxs to compile (for example):

/usr/bin/apxs -cia mod_flvx.c

Non WHM/cPanel users
Should now add those two lines into httpd.conf:

LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv

and simply restart Apache using:

service httpd restart

WHM/cPanel users
Should use Include Editor since any changes made to httpd.conf will be lost in case of rebuilding apache.
So login to WHM and go to Apache Configuration -> Include Editor -> Pre Main Include -> All Versions and in the box that appears copy/paste following two lines and after saving that confirm Apache restart.

LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv

Here are a few pictures for newbies so they can find their way trough more easily:

1. Apache Configuration
2. Include Editor
apache include editor whm cpanel

3. Locate PreMain Include – select All Versions
4. Copy/paste those two lines and press Update (then confirm Apache reload)
apache include editor whm cpanel

Setting up the player
If you use JW Player (that I strongly recommend) you need to set provider to value http.
jwplayer provider http
Visit JW Player setup wizard to easily install JW Player on your site.

MP4 Streaming using Apache
To learn how to setup MP4 streaming using Apache click here

Tags: apache flv streaming

Solution for yum problems on new CentOS 6 + WHM installations

Recently I discovered problems trying to install anything using yum on new servers based on CentOS 6 (64-bit) + WHM/cPanel. I was trying to install subversion using yum:

yum install subversion

And I was getting following output:

Error: Package: subversion-1.6.11-7.el6.x86_64 (base)
           Requires: perl(URI) >= 1.17
 You could try using --skip-broken to work around the problem
** Found 5 pre-existing rpmdb problem(s), 'yum check' output follows:
bandmin-1.6.1-5.noarch has missing requires of perl(bandmin.conf)
bandmin-1.6.1-5.noarch has missing requires of perl(bmversion.pl)
bandmin-1.6.1-5.noarch has missing requires of perl(services.conf)
exim-4.77-1.x86_64 has missing requires of perl(SafeFile)
frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0

And I would get that trying to install just about anything with yum or by calling yum check.

To solve this problem you will have to open /etc/yum.conf for editing and to locate perl* in exclude= line and remove it (just perl* part). Now install anything by running the yum install package_name it will solve all those problems that you had! Once the installation is done and problems are solved, don’t forget to put perl* back to /etc/yum.conf in exclude= list!

Tags: frontpage-2002-sr1 2 i386 has missing requires of libexpat so 0, bandmin-1 6 1-5 noarch has missing requires of perl(bandmin conf), ** found 29 pre-existing rpmdb problem(s) \yum check\ output follows: