Tuesday, October 30, 2018

Time not displaying correctly in cPanel webmail (SquirrelMail)


It was found that the server timezone was set correctly and time was synchronized with an NTP (network time protocol) server, however it was not displaying correctly for clients when they logged into cPanel webmail, specifically SquirrelMail that shows the time in the top left corner. It was off by an hour (indicating a timezone difference in calculation somewhere).
SquirrelMail says that this issue is not in the code but whatever the underlying php provides is displayed there. The reason was that cPanel’s php engine was not calculating the timezone correctly. To fix this issue, edit the php.ini file located at
/usr/local/cpanel/3rdparty/php/53/etc
Uncomment the line that starts with date.timezone:
date.timezone = "TIMEZONE"
And replace the TIMEZONE in above line from one of the supported timezone settings in php documentation e.g. “Australia/Sydney”. And enclose the string in quotes. Save the file and refresh the webmail interface to view correct time.

Wednesday, October 3, 2018

htaccess code for leverage browser caching and gzip compression

<IfModule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf 

Mixed Content Error - Wordpress

https://wordpress.org/plugins/ssl-insecure-content-fixer/#description

Error - ClamAV socket [] not found

Hello All,

You must install ClamAV (Clamavconnector on cPanel) or ensure clamd is running to use this product correctly.

If the clamd socket is not automatically detected, and to clear this message, you must set clamdsock=/path/to/socket in /etc/cxs/cxs.defaults to the live socket location

Enter the following command in terminal to resolve the issue:

/usr/local/cpanel/3rdparty/bin/clamd