Soapclient error with php 7.1 on shared server

Asked

Viewed 556 times

1

I have the following code that works perfectly on host location:

$wsdl ='http://ws.portaledu.com.br:8051/wsConsultaSQL/MEX?wsdl';

$client = new SoapClient($wsdl,array(
    'trace' => true,
    'exceptions' => true,
    'login' => $login,
    'password' => $password
));

When I put in the hosting, this code returns error 500:

[24-May-2018 09:57:01 America/sao_paulo] PHP Fatal error: Uncaught Soapfault Exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from 'http://ws.portaledu.com.br:8051/wsConsultaSQL/MEX? wsdl' : failed to load External Entity "http://ws.portaledu.com.br:8051/wsConsultaSQL/MEX? wsdl" in /home/stiloso/public_html/Fametro/result/teste.php:16 Stack trace:

0 /home/stylish/public_html/Fametro/result/test.php(16): Soapclient->Soapclient('http://ws.door...', Array)

1 {main} thrown in /home/stiloso/public_html/Fametro/resultado/teste.php on line 16

Whatever is missing from the server, I am using PHP 7.1

  • 2

    Access to prota 8051

  • @Davidalves the door is open, so much so that I can access http://ws.portaledu.com.br:8051/wsConsultaSQL/MEX? wsdl if it were blocked wouldn’t even open it, would it? (And that same code pointing to that address works on the localhost)

1 answer

1

Your problem is probably happening coming from the file php.ini

On the error server, uncomment the line:

;extension=php_openssl.dll

Removing the ;

  • on the very return of phpinfo() I found that: OpenSSL support : 
enabled (Is active)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.