Updating the CAS Library to the Latest Version

Drupal Version

While the phpCAS library is pretty stable, its maintainers do still release updates periodically, and every now and then one of those updates is to fix a security issue. Below are step-by-step instructions for how to update your phpCAS library to the most current, secure version.

For this example, we will update from version 1.3.2 to version 1.3.3, but the same steps should apply to updating between any versions of the phpCAS library (which allows logins with GTaccounts to our drupal sites).

  1. Download the latest version of phpCAS from the phpCAS website.
  2. If you don't want to use ssh/command line, "extract" the files from this compressed archive on your computer (Windows users can use the free 7-zip program to do so), which will create a folder called CAS-1.3.3, that has another CAS-1.3.3 directory and a package.xml file inside it.
  3. Change the name the second CAS-1.3.3 folder (that is inside the other) to CAS.
  4. Zip up that re-named "CAS" folder...usually by right-clicking and choosing either Compress "CAS" (on a Mac OS X computer) or Send to -> Compressed (zipped) folder (on a Windows computer).
  5. Now that you have a friendly zipped file, named "CAS.zip", find where the CAS library lives on your server. The best practices location on a Drupal site is under the "sites/all/libraries" folder (which often requires you to add the Libraries module to your Drupal site, first).
  6. Then, turn on your TEST site's maintenance mode (because, of course, you are not trying this out on your live site). For Drupal 7, you can enable this at: admin/config/development/maintenance
  7. Delete the current version of phpCAS that lives at sites/all/libraries, so that there is no "CAS" folder anymore.
  8. Upload your new CAS.zip file to your Test site's libraries folder, so that it looks like this: sites/all/libraries/CAS.zip.
  9. Check the box next to CAS.zip in your web hosting panel and then, from the menu of options at the top of your file list, choose More -> Extract Files and then select Okay.
  10. Once you see your new "CAS" folder, you can then delete the "CAS.zip" file from this directory and your library has been updated.
  11. Remove your Test site from maintenance mode and make sure it works correctly.
  12. If all goes well, follow the same process on your Live site.