Hi guys, there is a big problem with the code in the module, look:

function soapclient_init() {
  global $_soapclient_MCRYPT;
  global $_soapclient_AES128;

  // check, which encryption library to be used.
  $_soapclient_MCRYPT = NULL;
  $_soapclient_AES128 = NULL;
  
  if ( ! extension_loaded('mcrypt') ) {
    // try loading the mcrypt
    $ext = ( drupal_strtoupper( drupal_substr(PHP_OS, 0, 3) ) === 'WIN' ) ? 'php_mcrypt.dll' : 'mcrypt.so';
    if ( ! @dl($ext) ) { // THIS CAUSE A FUCKED FAMOUS WSOD (White Screen Of Death)
      // cannot load mcrypt, use AES128 for password encryption.
      require_once("lib/AES128.php");
      $_soapclient_AES128 = new AES128(FALSE, FALSE);
      return;
    }
  }
  
  $_soapclient_MCRYPT = mcrypt_module_open(MCRYPT_3DES, '', 'cbc', '');
}

As you can see the code not match de SO installed (Debian/CentOS/etc...) and not all systems have mcrypt library, look:

http://www.linuxquestions.org/questions/red-hat-31/rhel6-no-php-mcrypt-s...

It would be advisable not to try to load the library. In its place would be better to use the file provided with the module 'AES128.php' to avoid this problem.

Best Regards.

CommentFileSizeAuthor
#1 soapclient.module.patch974 bytesanieves
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anieves’s picture

Suggested patch.

greggles’s picture

Title: mcrypt missing in CentOS/RHEL » Make the fallback to AES128.php work on all platforms - mcrypt missing in CentOS/RHEL
Status: Active » Needs review

Re-stating the title to match what I think is happening in the code.

Also, this is "needs review."

apaderno’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)
Issue tags: -mcrypt, -centos, -missing, -php-mcrypt, -red hat, -rhel

I am closing this issue, as Drupal 4.7, 5, and 6 are now not supported.