Upgrade WHMCS

The below documentation is designed to allow you to both confidently and successfully update your WHMCS installation. We always recommend staying up-to-date with WHMCS in order to benefit from the latest development and improvements, and you can do that either by having us perform the upgrade for you or by updating as per the steps below.

Perform Upgrade

Watch Video Tutorial

he steps needed to upgrade WHMCS stay the same from version to version. However some updates may require additional steps which are unique to them. Should these be required you will find them in the Release Notes. Please always refer to the release notes for a version before attempting any upgrade.

A Full Release distribution contains all the files of a WHMCS product installation. It can be used to perform a new install or update an existing installation (regardless of previous version).

Patch Sets contain only the files that have changed between the immediate, previous version and the latest version, (ie. a patch set for version 1.1.2 is valid for a 1.1.1 installation and nothing else). We provide these to make updating both quicker and easier for those of our customers who stay current and up-to-date with the latest WHMCS releases. By including only the changed files, patch sets have less files to upload which makes the upgrade process quicker and simpler for you to perform.

More information on our release types and distribution types can be found on our Releases page.

Upgrade Steps

For a Full Release Version

A full release version is denoted by the presence of _full within the zip folder filename and “Distro Type: Full Version” within the included README.txt file. If the zip file you have instead contains _patch, please refer to the below Patch Set Upgrade Steps instead.

Make a Full Backup – We cannot stress enough how important it is to *always* take a full backup before attempting any kind of upgrade. Both for WHMCS and any other software you use. A full backup should be taken of both the WHMCS files and the database.

  1. Begin by obtaining the latest full release download of WHMCS either from our client area or from your license provider (if using a reseller)
  2. Unzip the contents of the WHMCS zip file download to a folder on your computer
Custom Admin Directory?
If you have renamed your “admin” directory, be sure to rename the /whmcs/admin directory in the new files to match.
 Custom Cron Directory?
Similarly, if you have customised the location of the /crons/ directory, be sure to upload that to the custom location
  1. Upload the new files to your existing installation folder replacing any existing folders & files
  2. Visit your WHMCS installation and you should then be automatically redirected to the upgrade process. If you see a message saying WHMCS is not installed, this indicates you have overwritten the configuration.php file for your installation. Stop and restore that file from your backup before continuing.
  3. Agree to the WHMCS End User License Agreement and follow the steps on screen to upgrade your database.
  4. When prompted, delete the install folder from your server.
  5. Your upgrade is now complete.

We recommend now that you check the release notes for the version you just installed (for Version 5.3 those can be found here. And if you have custom template files you will also need to review and make any necessary changes to your custom templates using the information provided in the Template Changes section of the Release Notes.

For a Patch Set

A patch set version is denoted by the presence of _patch within the zip folder filename and “Distro Type: Patch Set” within the included README.txt file.

IMPORTANT: Before you begin please ensure you are running the version required by the patch. Patch Sets contain only the files that have changed between the previous release and the Patch Set Version. Therefore they should only be applied if you are running the immediately previous version.

The previous release version that these patch sets are designed for is clearly indicated as the first and smaller number in release notices providing the patch set download link.

  1. Download the patch set using the link provided in the release announcement
  2. Unzip the patch set files
Custom Admin Directory?
For patches that have updates for the “admin” directory: If you have renamed your “admin” directory, then make sure you rename the /whmcs/admin directory to match
  1. Upload the files from the /whmcs/ directory to the root directory of your WHMCS installation
  2. Visit the admin area of your WHMCS installation to trigger the version number bump and complete the process

No install or upgrade process is required.

Confirming a Successful Upgrade

To confirm an upgrade has been successfully applied, login to your WHMCS admin area and check to make sure that the Version Number displayed either on the admin homepage (in the sidebar of all default templates) or in Help > Check for Updates is the version you attempted to apply. If it has not incremented, then one or more of the files has not uploaded successfully. You should double check file permissions and attempt the steps again from the beginning.

Helpful Hints

Customisations

If you have customised templates, please ensure you always follow the recommended method for creating a custom template folder to ensure your changes aren’t overwritten during upgrades. Similarly for language file customisations please ensure you use the Language Overrides feature vs editing the language files directly.

Bad Formatting

If when you first login you see a display where formatting is mixed or unclear, this can indicate your browser cache has not updated. Try clearing your browser cache or performing a hard refresh (typically Ctrl + F5) and delete the contents of the template cache directory (templates_c by default) to ensure you see the new templates and styling.

What to do if you get a Down for Maintenance or Upgrade in Progress message after uploading a patch set

If after uploading the files from a Patch Set you see a “Down for Maintenance” or “Upgrade in progress…” warning message then this indicates that the patch set files you attempted to apply are not compatable with the version of WHMCS you were previously running. To complete the upgrade you will need to download the latest Full Release version and upgrade using the regular upgrade process as described above.

We’re here to help

We offer a professional upgrade service where our staff will upgrade your WHMCS installation for you. Please refer to http://www.whmcs.com/services/upgrade-service/ for more information and to order.

And of course our support team is always available to answer any questions or concerns you might have when performing the upgrade process yourself. Simply open a ticket @ http://www.whmcs.com/get-support/ and a member of our team will get back to you.

Apache Status and Error Code

Signup for two years on Shared Hosting and get ONE year FREE

Signup for two years on Shared Hosting and get ONE year FREE

HTTP status codes are standard types of errors so you could see them in any browser, like Internet Explorer, Firefox, Chrome, etc. The following errors are mostly   displayed in your browser.

Use the following Apache Status and Error Code:-

400 Bad Request – This error code can be received due the  bad structured http request to the server. Or in other words the web server to which you are sending this   request cannot handle it. The most common reason for such error massage is errors in the code of the files you are trying to reach .

401 Unauthorized – This error massage is given in most of the cases due the fact that you are trying to reach a password protected resource on the server and you   have provided wrong credentials for the authorizing process. In case you have forgotten your login credentials to this particular resource you can login into your cPanel   and change these credentials using the Password protected directories feature.

403 Forbidden – Usually this error massage is received if you are trying to access a resources which is forbidden. In most of the cases the forbidden rule is located into the .htaccess file and if you are not the one who have inserted it in most of the cases you should contact your web-hosting provider.

404 Not Found – This error massage is given usually when you are trying to reach an unexisting resource on the server. In such cases you should check one more time time the URL for any mistakes in it.

500 Internal Server Error – This error massage is given usualy when you are trying to access athan4 resource which have wrong file permissions or invalid .htaccess file. In such cases you should simply check the permissions of the file you are trying to reach and if some of the numbers are lower than 4 you should correct these due the fact that such files have no privileges to be red.

502 Bad Gateway – The 502 Bad Gateway HTTP status code means that one server received an invalid response from another server that it was accessing while attempting to load the web page or fill another request by the browser. In other words, the 502 error is an issue between two different servers on the Internet that aren’t communicating properly.

503 Service Unavailable – The 503 Service Unavailable HTTP status code means the web site’s server is simply not available at the moment. 503 errors are usually due to a temporary overloading or maintenance of the server.

504 Gateway Timeout – The 504 Gateway Timeout HTTP status code means that one server did not receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser. This usually means that the other server is down or not working properly.

 

APACHE SERVER STATUS & ERROR CODES

Successful Client Requests
200 OK
201 Created
202 Accepted
203 Non-Authorative Information
204 No Content
205 Reset Content
206 Partial Content
Client Request Redirected
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy
Client Request Errors
400 Bad Request
401 Authorization Required
402 Payment Required (not used yet)
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable (encoding)
407 Proxy Authentication Required
408 Request Timed Out
409 Conflicting Request
410 Gone
411 Content Length Required
412 Precondition Failed
413 Request Entity Too Long
414 Request URI Too Long
415 Unsupported Media Type
Server Errors
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported

 

How to reset Umbraco admin password

The best technique to use is this one:

Run this SQL query on the database (or edit the table manually)

UPDATE umbracoUser set userdisabled=0, userLogin=’admin’, userPassword=’default’ where id=0

Now search in the web.config the UsersMembershipProvider and change the

passwordFormat=”Hashed”
into Clear:
passwordFormat=”Clear”

Now you should be able to login with admin / defaultIf that works, revert the change in the web.config and save the web.config. Now change the admin password by using the umbraco-client (users/administrator/reset password)

Check the database to see that the password is hashed again.

Fix hardware clock issue from a Xen VM

Run an independent clock for your XEN VM. Which  will fix the hardware clock problem, unless you don’t have access to host node. Always best to keep the hardware clock of Dom0 with synchronization.

But if your server provider won’t give support for you , please set it as follows,

Setup the wall clock in /proc

echo 1 > /proc/sys/xen/independent_wallclock

To keep the setting between reboots, just add it to the /etc/sysctl.conf

xen.independent_wallclock = 1

This will resolve your issue.

How to fix cPanel Roundcube : An error occurred! Could not save the contact address

We came across the issue where a cPanel user logged into Roundcube webmail and was unable to add a contact to address book.

The specific error that Roundcube output on the screen was “An error occurred! Could not save the contact address.” which meant Roundcube had to have something other than a web error as everything else worked perfectly fine.

Well turns out it was actually a database error that I believe was caused due to a recent automatic upgrade when cPanel ran the normal cron runs.

Roundcube Error :
Recently I came across the issue where a cPanel user logged into Roundcube webmail and was unable to add a contact to address book.

The specific error that Roundcube output on the screen was “An error occurred! Could not save the contact address.” which meant Roundcube had to have something other than a web error as everything else worked perfectly fine.

Well turns out it was actually a database error that I believe was caused due to a recent automatic upgrade when cPanel ran the normal cron runs.

Force Upgrade :

First step I took was to attempt and force cPanel to upgrade Roundcube…this will normally output an error giving you insight on what the problem is, or even sometimes fix it :)

To force a Roundcube upgrade on a cPanel server run this command via SSH:

/usr/local/cpanel/bin/update-roundcube –force

While attempting to upgrade the script output something that pointed right to the problem:

Archiving current Roundcube data to /var/cpanel/roundcube/roundcube.backup.sql mysqldump: Got error: 144: Table ‘./roundcube/contacts’ is marked as crashed and last (automatic?) repair failed when using LOCK TABLES Failed to backup existing Roundcube DB. DB likely did not exist.Cleaning old Roundcube data archives

Roundcube Logs

To check if this was the only error we might as well check the logs as well.  Roundcube stores error logs (really just logs in general) in a specific location on cPanel servers, you can find them at:

/var/cpanel/roundcube/log

You can monitor the output of the error log by using this command via SSH:

tail -f /var/cpanel/roundcube/log/errors

You can then repeat the the process and see what error is output.  You can also just omit the  -f from above to output the last few lines in the error log.
In my case I found this error multiple times:

DB Error: Table ‘./roundcube/contacts’ is marked as crashed and last (automatic?) repair failed (SQL Query: SELECT *
Repair Database

The output from the error log and the installer point right to what is causing the problems with adding a contact to the address book.  After reading around on a few sites I found that a handful of people have had similar issues when upgrading roundcube, so my only assumption is this may have caused it when cPanel upgraded last.  Either way, the fix is easy and all we need to do is repair the database.

To run a repair on the Contacts table in the Roundcube Database, run this command via SSH:

cd /var/lib

sudo -u mysql myisamchk -r -v -f mysql/roundcube/contacts

Force Install/Upgrade of Roundcube

Now that we’ve repaired the database, lets try to force the upgrade again and hopefully not find any other errors:

/usr/local/cpanel/bin/update-roundcube –force

How to Prevent unauthorized WordPress wp-admin and wp-login.php attempts

How to lock down and password protect your WordPress website from invalid login attempts. We’ll do this by limiting access to the /wp-admin directory and the wp-login.php script.

Password protect WordPress logins

Using the steps below to create password protection for your /wp-admin directory. We’ll also copy those rules over to protect your wp-login.php script.

Please note that users have reported to us in certain cases following these steps will result in a re-direct loop. If you’re having that issue, please ensure you have the following two entries at the top of both .htaccess files:

ErrorDocument 401 “Denied”
ErrorDocument 403 “Denied”

You may get password prompts even when you aren’t trying to login to WordPress. Usually this is because of plugins. Please make sure to allow /wp-admin/admin-ajax.php requests without password protection.

Reseller Hosting Offer: Get additional 12 months including Free WHMCS | ENOM Reseller |SSL/IP’s

Reseller Hosting Offer: Get additional 12 months including Free WHMCS | ENOM Reseller |SSL/IP’s

1. Login to your cPanel.

2. Under the Security section, click on Password Protect Directories.

3. select document root click go Select the Document Root for your domain, then click Go.

4. click on wp adminClick on your wp-admin directory

5. Check Password protect this directory, give it a name, then click Save.

6. Now click on Go Back.

7.  Click on Password Generator.
Click on Generate Password a few times, and copy your password.
Check I have copied this password in a safe place.
Then click Use Password.

8. Now type in a Username, then click on Add/modify authorized user.

9. Try to access your /wp-admin directory.
Your browser will prompt you for the username/password you just created.
Type them in, and click Log In

10. Your normal WordPress admin login page should now display.

You might encounter a re-direct loop at this point. If so, please ensure you’ve created the error documents mentioned earlier in this article.

11.  Now go back to cPanel.
Under the Files section, click on File Manager.
Select the Document Root for your domain.
Check Show Hidden Files (dotfiles), then click Go.

12. From the left-hand directory listing, expand public_html.
Click on wp-admin, then right-click on your .htaccess file.
Then click on Edit
For the encoding pop-up, click on Edit again to bypass that.
13. Copy all the code in the .htaccess file.

While you still have the /wp-admin/.htaccess file open, also go ahead and add the code in colour:

ErrorDocument 401 “Denied”
ErrorDocument 403 “Denied”

# Allow plugin access to admin-ajax.php around password protection
<Files admin-ajax.php>
Order allow,deny
Allow from all
Satisfy any
</Files>

AuthType Basic
AuthName “Secure Area”
AuthUserFile “/home/example/.htpasswds/public_html/wp-admin/passwd”
require valid-user

14. From the left-hand directory listing, click on public_html.
Right-click on your .htaccess file, then click on Edit.

15. Now paste the .htaccess code you copied, in-between some <FilesMatch> tags, so that it ends up looking like this:

ErrorDocument 401 “Denied”
ErrorDocument 403 “Denied”

<FilesMatch “wp-login.php”>
AuthType Basic
AuthName “Secure Area”
AuthUserFile “/home/example/.htpasswds/public_html/wp-admin/passwd”
require valid-user
</FilesMatch>

Then click on Save Changes up at the top-right.

16. Now if someone tries to directly login via wp-login.php they will be prompted for a valid user as well.

17. When a user enters invalid credentials are, they will get an Authorization Required error. They will then not be able to attempt to login to your WordPress admin directly.

How to Install MOD_FASTCGI on cPanel server

Installation requirements for compilation

# yum install httpd-devel apr apr-devel libtool

Download latest mod_fastcgi source code

# cd /opt
# wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz

Untar the package.

# tar -xvzf mod_fastcgi-current.tar.gz

Install the module. You can find the installation guide on the INSTALL.AP2 file. We have to specify top_dir in the make and make install commands because we install apache2/httpd using yum

# cd mod_fastcgi-2.4.6
# cp Makefile.AP2 Makefile
# make top_dir=/usr/lib/httpd
# make install top_dir=/usr/lib/httpd

(IF there is error you can use the command
apxs -n mod_fastcgi -i -a -c mod_fastcgi.c fcgi_buf.c fcgi_config.c fcgi_pm.c fcgi_protocol.c fcgi_util.c)

Add “LoadModule fastcgi_module modules/mod_fastcgi.so” to /etc/httpd/conf/httpd.conf to tell apache to load the new module

Restart apache

# /etc/init.d/httpd restart

How to fix “suhosin.so: undefined symbol: zend_atol” error

If you are getting error as

“/usr/bin/php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: undefined symbol: zend_atol”

then disable the suhosin by commenting

extension=”suhosin.so” to ;extension=”suhosin.so”

and add line suhosin.simulation On in the php.ini file.

If you don’t have the access to php.ini file you can FTP / login to cPanel >> File Manager >> create a custom php.ini  file under the public_html folder and add the above lines (;extension=”suhosin.so”  &  suhosin.simulation On)

Increase size for /tmp partition (Linux Server)

In order to increase the size of /tmp partition. Go through the following steps :

1. First stop MySQL, Apache, and cPanel to prevent writing to the /tmp partition :

root@dodg [~] #  /etc/init.d/mysql stop
root@dodg [~] #  /etc/init.d/httpd stop
root@dodg [~] #  /etc/init.d/cpanel stop

2. Take a backup of the current /tmp folder.

root@dodg [~] #  tar -czfv tmp.tar.gz tmp

3. Umount /tmp partition. If you’re unable to, you can do an lsof to see what processes are still writing to it, and kill them off.

root@dodg [~] #  umount tmp

4. Delete /usr/tmpDSK

root@dodg [~] #  rm -rf /usr/tmpDSK

5. Now edit the file /scripts/securetmp. Search for “tmpdsksize” and set the size you want in MB.

root@dodg [~] #  vi /scripts/securetmp

$tmpdsksize = 512000 (change the “512000? value to your desired size in MB)

Save and quit the file.

This will recreate your /tmp (tmpDSK) partition using the size you specified. While the securetmp script may be overwritten in a cPanel update, the size of /tmp will not be affected one you alter its size.

6. Now you can untar the /tmp backup

root@dodg [~] #  tar -xzvf tmp.tar.gz

7. Start all the services.

root@dodg [~] #  /etc/init.d/mysql start
root@dodg [~] #  /etc/init.d/httpd startssl
root@dodg [~] #  /etc/init.d/cpanel start

Installation Mono Framework on Linux Server (CentOS)

When you compile Mono from the source, you can install newer versions than are offered by Novell.

Mono versions are available at:

http://download.mono-project.com/sources/mono/

Let’s Install all the Dependencies
Run the below as root

# yum install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libgdi* libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget

Time to Download and Compile
Run the below as root

# cd /usr/local/src

# wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.gz

# tar zxvf mono-2.10.8.tar.gz

# cd mono-2.10.8

# ./configure –prefix=/usr/local

# make && make install

If you do receive “Out of Memory” errors, run the below:

# ulimit -v unlimited