Title: mcrypt error when viewing unit page
Last modified: January 11, 2017

---

# mcrypt error when viewing unit page

 *  Resolved [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/)
 * I’m having yet another problem with CoursePress. This time I am getting the following
   error:
 * Warning: mcrypt_encrypt(): Key of size 20 not supported by this algorithm. Only
   keys of sizes 16, 24 or 32 supported in /home/content/p3pnexwpnas13_data03/53/
   3103553/html/wp-content/plugins/coursepress/2.0/include/coursepress/helper/class-
   utility.php on line 496
 * You can see the screenshot here. This screenshot uses the default CoursePress-
   supplied theme.
    [https://www.dropbox.com/s/lymrw7nf11vk9wx/CoursePress%20Error.jpg?dl=0](https://www.dropbox.com/s/lymrw7nf11vk9wx/CoursePress%20Error.jpg?dl=0)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8648724)
 * Hello wpdev999,
 * What PHP version do you have on your server?
 * I need to consult this with developer because I can see we had similar issue 
   in past, but for different file and I’m not sure at the moment if provided fix
   would also work for you.
 * kind regards,
    Kasia
 *  Thread Starter [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8650923)
 * This site is running PHP 5.6.27.
 *  Plugin Support [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * (@wpmudev-support9)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8674596)
 * Hello [@wpdev999](https://wordpress.org/support/users/wpdev999/), I hope you 
   are doing well
 * Please download the file :
    [https://ufile.io/c99261](https://ufile.io/c99261)
 * And replace it with the one located in this path:
    `coursepress/2.0/include/coursepress/
   helper/class-utility.php`
 * This should fix the issue. Also, make sure that you will keep the original class-
   utility.php file, just in case if something goes wrong, you can place it back.
 * Let me know how it goes!
 * Cheers,
    Nastia
 *  Thread Starter [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8675151)
 * This seems to have fixed the mcrypt error, but now everytime I click Next on 
   a unit it doesn’t do anything. The screen dims but nothing happens.
 *  Thread Starter [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8685251)
 * Since replacing this file with the one provided we now get “Fatal error: Using
   $this when not in object context in” referencing the class-utility.php file on
   line 487.
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8687421)
 * Hello wpdev999,
 * Thank you for additional information. I’m passing this to developer so they can
   provide a better fix for this issue.
 * kind regards,
    Kasia
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8687442)
 * Hello wpdev999,
 * I got more info – this will be fixed in next version. Can you now replace new
   file class-utility.php with old file and as workaround in wp-config.php find 
   line
 * `define('NONCE_KEY', 'put your unique phrase here');`
 * and where there is “put your unique phrase here” insert key that is more than
   24 characters. It is possible that you already have key inserted there – then
   just increase the length of it above the 24 characters.
 * Let me know if this works for you.
 * kind regards,
    Kasia
 *  Thread Starter [wpdev999](https://wordpress.org/support/users/wpdev999/)
 * (@wpdev999)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8689010)
 * Going back to the old file and changing the key seems to work so far, but more
   testing will be required.
 *  Plugin Author [jdailey](https://wordpress.org/support/users/jdailey/)
 * (@jdailey)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8702215)
 * Thank you for the update. Let us know if you run into any problem.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘mcrypt error when viewing unit page’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/coursepress_f7e9b6.svg)
 * [CoursePress Learning Management System](https://wordpress.org/plugins/coursepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/coursepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/coursepress/)
 * [Active Topics](https://wordpress.org/support/plugin/coursepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/coursepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/coursepress/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [jdailey](https://wordpress.org/support/users/jdailey/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/mcrypt-error-when-viewing-unit-page/#post-8702215)
 * Status: resolved