0

I'm fairly new to php and am struggling a but. I am trying to do a SOAP call and the php file works on a CentOS 7 installation but on CentOS 8, the same php file returns and error.

I don't know what I'm missing but I have tried using the IP address instead of api.learningassistant.com and I've also tried adding libxml_disable_entity_loader(false); to the php file before calling SoapClient.

I have also added ['trace' => true, 'cache_wsdl' => WSDL_CACHE_MEMORY] to the end of the SoapClient call but none of the above have worked.

This is the error that I receive in /var/log/php-fpm/www-error.log:

 PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://api.learningassistant.com/webservices/soap/authenticate.cfc?wsdl' : failed to load external entity "https://api.learningassistant.com/webservices/soap/authenticate.cfc?wsdl"
 in /var/www/html/la_companies.php:38
Stack trace:
#0 /var/www/html/la_companies.php(38): SoapClient->SoapClient('https://api.lea...', Array)
#1 /var/www/html/la_companies.php(28): las_api->la_auth()
#2 /var/www/html/la_companies.php(81): las_api->__construct('https://api.lea...', 'zzz', '12345678')
Kalana
  • 5,631
  • 7
  • 30
  • 51
Alex
  • 1
  • It is possible that in CentOS 7 php version or its configurations differ from CentOS 8, check if you've enabled php_openssl extension in the new configuration. – Sergio Rinaudo Nov 15 '19 at 15:49
  • Thanks for the suggestion. The phpinfo() shows 'OpenSSL support' as Enabled and shows it as version OpenSSL 1.1.1 FIPS 11 Sep 2018, does this mean that php_openssl extension should be enabled? I also added the line extension=php_openssl.so into the php.ini file but this did not have any affect. I have tried an earlier and later version of php to the CentOS 7 version but it still shows the error. The current version of php is 7.2.11 – Alex Nov 21 '19 at 10:08
  • What about the allow_url_fopen directive ( php.ini )? What is your current value? It should be "On" – Sergio Rinaudo Nov 22 '19 at 11:08
  • Yes, the /etc/php.ini does have the line allow_url_fopen = On – Alex Nov 22 '19 at 14:29

0 Answers0