Monthly Archives: December 2017

Your system has run out of available ip addresses, or you do not have permission to use any more ip addresses WHMCS

While activating a new account I could see an error

Your system has run out of available ip addresses, or you do not have permission to use any more ip addresses

The issue was due to the server running out of spare dedicated IP address

The issue can be resolved in 2 ways

1) Adding additional IP address in server

2) By editing file  /var/cpanel/packages/abckhosting which is a package file which is assigned to customers.

SSH to server in question on which account is activated  and  edit the package file as mentioned

vi /var/cpanel/packages/abckhosting

The parameter IP=y needs to be changed to  IP=n to get account activated without adding new  IP address.

BWLIMIT=unlimited
CGI=y
CPMOD=paper_lantern
DIGESTAUTH=n
FEATURELIST=default
HASSHELL=n
IP=n
LANG=en
MAXADDON=5
MAXFTP=5
MAXLST=unlimited
MAXPARK=5
MAXPOP=unlimited
MAXSQL=10
MAXSUB=5
MAX_DEFER_FAIL_PERCENTAGE=unlimited
MAX_EMAIL_PER_HOUR=unlimited
QUOTA=100000
_PACKAGE_EXTENSIONS=

 

This did help in creating new account without adding additional IP address

 

How to fix invalid cPanel license error when the IP is in fact licensed

 

Was getting below error on cpanel server  even when cpanel license was assigned for main server IP address

root@server4 [/etc/sysconfig/network-scripts]# /usr/local/cpanel/cpkeyclt
Updating cPanel license…Done. Update Failed!
Error message:
The cPanel license server said that there was no license for your IP address.
For more information visit: http://www.cpanel.net/lic.html

The exact message was: Abort, Retry, Fail?

Building global cache for cpanel…Done

 

The issue was due to wrong entries in  /etc/hosts file

went ahead and set the correct hostname and IP in  /etc/hots file and  refreshed cpanel license

root@server4 [/etc/sysconfig/network-scripts]# /usr/local/cpanel/cpkeyclt
Updating cPanel license…Done. Update succeeded.
Building global cache for cpanel…Done
root@server4 [/etc/sysconfig/network-scripts]#

 

Ffmpeg on Centos 7 and Centos 6

Login to server via SSH

Below steps are for Centos 7

yum -y install epel-release

rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

rpm -Uvh  http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release0-5.el7.nux.noarch.rpm

yum -y install ffmpeg ffmpeg-devel

 

Below steps are for Centos 6

yum -y install epel-release

rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

wget https://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-1.el6.nux.noarch.rpm

rpm ivh  nux-dextop-release-0-1.el6.nux.noarch.rpm

yum -y install ffmpeg ffmpeg-devel

 

now we need to install ffmpeg-php to get it working using PHP

yum -y install git
git clone https://github.com/tony2001/ffmpeg-php.git

cd ffmpeg-php
/usr/local/cpanel/3rdparty/php/56/bin/phpize
/opt/cpanel/ea-php56/root/usr/bin/phpize
./configure –with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config

If you want to install on PHP 7 use

/opt/cpanel/ea-php7/root/usr/bin/phpize

 

[Usually before easyapache 4 only phpize would work] now as there are multiple version of PHP there is need to  phpize from above path.

The path would changes based on php version

if you are using PHP 7 path will be /opt/cpanel/ea-php70/root/usr/bin/phpize and

/opt/cpanel/ea-php70/root/usr/bin/php-config

You can find path using find command

[root@server ffmpeg-php]# find / -iname phpize
/opt/cpanel/ea-php55/root/usr/bin/phpize

/opt/cpanel/ea-php56/root/usr/bin/phpize

/opt/cpanel/ea-php70/root/usr/bin/phpize

 

Do not use path ./usr/local/cpanel/3rdparty/bin/phpize

 

Before compiling ffmpegphp

need to make sure all need files are in   /usr/include

When you install ffmpeg and ffmpeg-devel files get stored in  /usr/include/ffmpeg however ffmpeg while compiling looks for files in /usr/include/ so need to copy files to /usr/include using below command

scp -r /usr/include/ffmpeg/* /usr/include/

Now you can go ahead and compile

./configure –with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config

Note [Path /opt/cpanel/ea-php56/root/usr/bin/php-config will changed on which version you are installing ffmpeg]

[root@server ffmpeg-php]# find / -iname php-config

/opt/cpanel/ea-php55/root/usr/bin/php-config
/opt/cpanel/ea-php56/root/usr/bin/php-config
/opt/cpanel/ea-php70/root/usr/bin/php-config

 

now before making make and make install few things need to be modified.

mv /usr/include/libavutil/time.h /usr/include/libavutil/time.h_

now go ahead with make and make install

now   again need to rename the above file

mv  /usr/include/libavutil/time.h_    /usr/include/libavutil/time.h

 

 

ffmpeg modules will be installed in below path

root@server ffmpeg-php]# ls -al /opt/cpanel/ea-php56/root/usr/lib64/php/modules/
total 2712
drwxr-xr-x 2 root root 4096 Dec 7 07:07 .
drwxr-xr-x 4 root root 4096 Feb 22 2017 ..
-rwxr-xr-x 1 root root 32608 Feb 22 2017 bcmath.so
-rwxr-xr-x 1 root root 33792 Feb 22 2017 calendar.so
-rwxr-xr-x 1 root root 15584 Feb 22 2017 ctype.so
-rwxr-xr-x 1 root root 86928 Feb 22 2017 curl.so
-rwxr-xr-x 1 root root 180728 Feb 22 2017 dom.so
-rwxr-xr-x 1 root root 281640 Dec 7 07:07 ffmpeg.so
-rwxr-xr-x 1 root root 57792 Feb 22 2017 ftp.so

 

Now go ahead and add extension=ffmpeg.so to php.ini for the PHP version you need and restart apache