0

Recently I asked my hosting company to setup a new package and since then my existing package is now giving me errors with anything to do with using openSSL.

For instance, I have a function to generate a GUID:

function generateGUIDV4($data)
{
    assert(strlen($data) == 16);
    $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100
    $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10
    return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
}

$newID = generateGUIDV4(openssl_random_pseudo_bytes(16));

This now throws an error: Fatal error: Call to undefined function openssl_random_pseudo_bytes(). From what I've researched this has to do with Fatal error: Call to undefined function openssl_random_pseudo_bytes().

Now I'm also getting an error now when I call any web services from my application which again point to the openSSL.

Error:

Objectfaultcode: "WSDL"faultstring: "SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://*******'"__proto__: Object 

.I've hidden the web service as it's not public. From what I've researched this points to OpenSSL again: SOAP-ERROR: Parsing WSDL: Couldn't load from <URL>.

PHP Ini is showing openSSL IS installed

OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.8b 04 May 2006

Anyone have any ideas or point me in the right direction? I've got the hosting company looking into this.

Community
  • 1
  • 1
Michael Bellamy
  • 543
  • 1
  • 8
  • 16

1 Answers1

0

I've fixed this and it had nothing to do with the hosting company.

I published a new version of the site, but in the publish profile I told it to delete all files which deleted the .htaccess file which contained the version of PHP in.

Unfortunately, I needed version 5.4 or above to run my code but since the file was removed it dropped down to 5.2 of PHP.

So I've uploaded a new .htaccess file with the correct version in and everything is working.

Hopefully this may help someone if they're as daft as I am.

Michael Bellamy
  • 543
  • 1
  • 8
  • 16