All posts by Joel Abraham

locale error in CentOS 6 !

Recently saw the issue in newly build CentOS6 VMs ( For me it was Virtuozzo based VMs ) :

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

Saw this error even after installing cPanel in the VPS.

This warning popped up every time you ran a command in shell, though it did not cause any issues

The fix was to run the following command :

localedef --no-archive -i en_US -f UTF-8 en_US.UTF-8

Should be good now !


Convert mp4 videos to mpg format !

At times, you will want to convert the mp4 videos to mpg format, which the common DVD players and the older TV’s support directly.

To do this, you can use the FFmpeg for Windows.

Download the program from :

Extract the zip file and copy the bin folder in the zip folder to your preferred drive, let it be C.

You may give the path like C:\ffmpeg\bin

Once done, copy the mp4 file to be converted  ( sourcefile.mp4 ) to this path, ie C:\ffmpeg\bin.

Open command line and run the following commands :

cd C:\ffmpeg\bin

ffmpeg -i sourcefile.mp4 -target pal-dvd -ps 2000000000 -aspect 16:9 targetfile.mpg

You will find the converted video file in the same path, ie C:\ffmpeg\bin


Issue with CurlSSL on CentOS 4 ! ( Ye, too old :P )

We are talking about CentOS 4 and CurLSSL here. We may have some legacy users facing this issue in enabling CurLSSL.

This was the error encountered :

vtls/openssl.c: In function `Curl_ossl_init’:
make[2]: *** [vtls/libcurl_la-openssl.lo] Error 1
make[2]: Leaving directory `/home/cpeasyapache/src/curl-7/lib’
make[1]: Leaving directory `/home/cpeasyapache/src/curl-7/lib’
dryrun test ‘Find Curl SSL path for PHP 5’ did not return true
!! Dry run failed for ‘Cpanel::Easy::PHP5::CurlSSL’ skipping option !!
— End opt ‘CurlSSL’ —
checking for cURL support… no
checking if we should use cURL for url streams… no
vtls/openssl.c:753: error: `CONF_MFLAGS_DEFAULT_SECTION’ undeclared (first use in this function)

When building curlssl in /home/cpeasyapache/src/curl-7,  this error can be corrected by adding the following :


to  the file –


Once this is done, we were able to complete the curlssl compile with ‘make’

You should be able to implement this by moving the old curlssl away and manually installing the modified source tree;

mv /opt/curlssl /opt/curlssl.old

cd /home/cpeasyapache/src/curl-7

make install

EasyApache should use this installed version when it builds next and you will see CurLSSL enabled !


Enabling PHP ImageMagick extension with IIS !


IIS 8.5 Installed

PHP 7.0.X ( 64 Bit) installed to C:\Program Files\PHP via WPI.

O.S :-  Windows Server 2012 / R2

We are about to  enable PHP ImageMagick extension with IIS

ImageMagick is free Open source software for displaying, editing image files in an easier way. It supports more than 200 image formats.

Step 1. Download ImageMagick

Go to and download ImageMagic exe file.

Step2. Installing of ImageMagick exe

Run the setup file (ImageMagick-6.9.3-7-Q16-x64-dll.exe ) .

Click I accept the agreement button & Click Next.



In the next window, click next and move on. You will be asked about the installation location.



It is recommend to change the default path ( C:\Program Files\ImageMagic x.x.x\ ) to any other folder in C drive. Otherwise it may not work properly.

Here I have created a folder call ‘IM’  in C drive &  is going to install ImageMagick into that folder.  Click Next after selecting the path.

Do not change the Options in the next window ( Select Additional Tasks). Leave it as default & click Next,




Click install in the next page and finish the installation.

Step 3 :- Adding proper DLL files into PHP extension folder.

Go to and Download the proper DLL files forPHP.

From PHP 7.0.0, it supports 64-bit architecture. To find if your PHP is 64- bit or not, open PHP info window and search for Architecture.

Also it will be Thread safe OR Non-Thread safe. We can use phpinfo for this one too. Check for thread safety in phpinfo window, If thread safety is disabled then your PHP is Non-Thread safe.

Once you determine the correct PHP Type, download the appropriate dll files from the above mentioned link. Copy and paste it to PHP extension folder. ( In default – C:\Programfiles OR Program Files (x86) \PHP\v7.0\ext )

Once completed, restart your web server.  

After restarting, open IIS manager and look for PHP Manager in it. Double click on PHP Manager and open it. Then in right pan you can see a new window called PHP Setup.

If you are opening  PHP manager for the first time, then you will see a message. ( red circle in the following image )  . Click on that and enable all.



Then click on  ‘Enable OR Disable Extension’ tab and find for php_imagick.dll . Click on it then click Enable button in the right side panel to enable  ImageMagic Extension.




Once enabled, restart IIS.

Once completed, open phpinfo page. You will be able to see that imagick module is added with php.

cPanel upgrade fails from 11.54 – Services broken !

A recent upgrade from cPanel / WHM 11.54 resulted in the services getting broken and not able to access the services.  Was able to find the following in the logs when attempt to restart cPanel was made :

Can’t locate Unix/PID/ in @INC (you may need to install the Unix::PID::Tiny module) (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/522/lib64/

The perl module Unix::PID::Tiny is missing which is causing the issues here. The fix would be to rebuild the RPM db.

Follow the steps given below to take backup of current RPM db and rebuild the RPM db:

cd /var/lib
mv rpm{,.old}
mkdir -p rpm
rpm --initdb
cp rpm.old/Packages rpm
rpm --rebuilddb

Kill the hanging RPM or upcp processes if any with the kill -9 $PID command. To find if there are any PIDs, run the following :

ps aux|grep rpm
ps aux|grep upcp

Once this is done, try for an upgrade :

/scripts/check_cpanel_rpms --fix
/scripts/upcp --force

Not able to delete files from file manager – Paper lantern theme

When cPanel is viewed using the Paper lantern theme, there was an error in which we were not able to delete any files over the file manager.

When loading over the Chrome, got the following in console :

utilities_container.js:13 Uncaught TypeError: Cannot set property ‘className’ of nullshow_panel @

As a workaround for this, tried re-installing the cPanel Paper lantern theme.

Removing Paper Lantern can be done by deleting its config folder or putting it in a separate folder.

#  mv /usr/local/cpanel/base/frontend/paper_lantern /root/jo

To re-install the theme simply run a cPanel update :

/scripts/upcp --force

This should fix the issue ! Atleast it worked for me 😀

cPanel service failing to start with a Perl error !

When trying to start the cPanel service via /scripts/restart_cpsrvd, was getting the following error :

cpsrvd: Setting up native SSL support … Can’t locate auto/Net/SSLeay/ in

The simple fix was to re-install the Net::SSLeay perl module

This can be done via SSH :

/scripts/perlinstaller Net::SSLeay


Installing MySQLnd in your cPanel server !

You might want to install the the MySQL native driver for PHP (MySQLnd) over the custom MySQL driver provided with the default EasyApache.

To enable this manually, you will need to edit the file :

/var/cpanel/easy/apache/rawopts/all_php5 and make sure the following entries are in place there :


Save the above file, run EasyApache from WHM and recompile as normal.