Build TimeZoneDB.so for Easy Apache 4 PHP

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

Note: For free support of LSWS please use the LiteSpeed forum. If you have an issue with cPanel (even while using LSWS) please contact cPanel support. They are fully trained to handle LiteSpeed Web Server.

What is timezonedb?

TimeZoneDB.so is a PHP PECL extension that supplies a database of all timezones from the Olson database from http://www.iana.org/time-zones 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 usages, 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

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. Login to 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

If you want to auto build for all installed versions of EA4 PHP follow 3a.

If you want to only build for a single version of EA4 PHP Follow 3b.

3a. Run the script to install TimeZoneDB.so for all installed versions of EA4 PHP.

  # Regular Usage
  ./buildtimezone_ea4.sh
  # No questions asked
  ./buildtimezone_ea4.sh y

3b. Run the script to install TimeZoneDB.so for specified versions of EA4 PHP.

  # Version number can either be X.X.X or X.X it will work either way
  ./buildtimezone_ea4.sh 5.6.23
  # Or when it prompts you just input specified version
  ./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, folks. If you run into any issues please let us know.

Removing TimeZoneDB

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. Login to 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

If you want to remove all installed versions of EA4 PHP follow 3a.

If you want to only remove for a single version of EA4 PHP Follow 3b.

3a. Run the script to install TimeZoneDB.so for all installed versions of EA4 PHP.

  # Regular Usage
  ./buildtimezone_ea4_clean.sh
  # No questions asked
  ./buildtimezone_ea4_clean.sh y

3b. Run the script to remove TimeZoneDB.so for specified versions of EA4 PHP.

  # Version number can either be X.X.X or X.X it will work either way
  ./buildtimezone_ea4_clean.sh 5.6.23
  # Or when it prompts you just input specified version
  ./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, folks. If you run into any issues please let us know.

 
litespeed_wiki/cpanel/build-timezonedb-ea4.txt · Last modified: 2016/11/09 15:57 by Johathan Kagan