TimeZoneDB

This guide will address how and why we need to build TimeZoneDB for Easy Apache 4.

What is TimeZoneDB?

TimeZoneDB.so is a PHP PECL extension that supplies a database of all timezones from the Olson database for all PHP date and time functions.

The Issue

Recent patches to Easy Apache 4 have removed a lot of standard PECL extensions and added them to their web utility to install. The issue with that is that it scans the whole system for PHP and builds it for each version it finds, even non-EA4 PHP. This causes high resource usage, which in most cases is a bad thing. This script that we provide will only build it for EA4 with predefined searches. This essentially cuts usage down and provides a more stable environment.

Installation

GUI

Installing TimeZoneDB.so for Easy Apache 4 PHP is very easy.

Here are the steps:

  1. Log into WHM and navigate to the LiteSpeed Web Server plugin. Click Resolve.
    !TimeZoneDB
  2. The following screen will display. Click OK.
    !TimeZoneDB
  3. The confirmation screen will show which PHP version it has installed TimeZoneDB for. Click OK when you are done.
    !TimeZoneDB

That's it!

Command Line

Installing TimeZoneDB.so for Easy Apache 4 PHP is very easy. We have created a script to automate the process for you!

Here are the steps:

  1. Log into the server you wish to install TimeZoneDB.so on via SSH. Make sure you are logged in as root.
  2. Get the scripts and prepare them.
    $ wget https://litespeedtech.com/packages/cpanel/buildtimezone_ea4.tar.gz
    $ tar -xzvf buildtimezone_ea4.tar.gz
    $ chmod a+x *.sh
    
  3. Run the script to install TimeZoneDB.so for all installed versions of EA4 PHP.
    # Regular Usage
    $ sudo ./buildtimezone_ea4.sh
    
    # No questions asked
    $ sudo ./buildtimezone_ea4.sh y
    
    # Version number can either be X.X.X or X.X it will work either way
    $ sudo./buildtimezone_ea4.sh 5.6.23
    
    # Or when it prompts you just input specified version
    $ sudo ./buildtimezone_ea4.sh 
    Do you wish to install timezonedb for all EA4 PHP Versions? (y, n, x.x, or x.x.x) 5.6.23
    

That's it!

Removing

Command Line

Removing TimeZoneDB.so for Easy Apache 4 PHP is very easy. We have created a script to automate the process for you!

Here are the steps:

  1. Log into the server you wish to remove TimeZoneDB.so on via SSH. Make sure you are logged in as root.
  2. Get the scripts and prepare them.
    $ wget https://litespeedtech.com/packages/cpanel/buildtimezone_ea4.tar.gz
    $ tar -xzvf buildtimezone_ea4.tar.gz
    $ chmod a+x *.sh
    
  3. Run the script to remove TimeZoneDB.so for all installed versions of EA4 PHP.
      # Regular Usage
      $ sudo ./buildtimezone_ea4_clean.sh
    
      # No questions asked
      $ sudo ./buildtimezone_ea4_clean.sh y
    
      # Version number can either be X.X.X or X.X it will work either way
      $ sudo ./buildtimezone_ea4_clean.sh 5.6.23
    
      # Or when it prompts you just input specified version
      $ sudo ./buildtimezone_ea4_clean.sh 
      Do you wish to remove timezonedb for all EA4 PHP Versions? (y, n, x.x, or x.x.x) 5.6.23
    

That's it!


Last update: April 17, 2020