colosso
colosso

Reputation: 2525

soap connection php causing error 500

I have following problem: I try to access a wsdl webservice from php. This is my current code:

if (isset($_POST['submit'])){

  $soap = new SoapClient("http://footballpool.dataaccess.eu/data/info.wso?wsdl");

}

All I get is "500 - Internal Server error" when i access this code. Currently my php is running on Windows Server 2008 R2 but I think that can't be the error source. Other applications like Wordpress run without any issue. Soap Client and Server is activated in php.ini. PHP version is 5.4.6. Anyone has any idea how to handle this?

Upvotes: 3

Views: 5132

Answers (1)

MrCode
MrCode

Reputation: 64526

The 500 Internal Server Error indicates that PHP encountered a Fatal Error.

The SoapClient will throw an exception if it can't access the remote file (due to networking), or it couldn't parse the XML.

From the Manual:

A SoapFault exception will be thrown if the wsdl URI cannot be loaded.

Check your error log for more info or turn on error reporting:

error_reporting(E_ALL);
ini_set('display_errors', '1');

Upvotes: 2

Related Questions