Basically the project I was assigned requires me connecting to an Exchange 2010 SP2 server via PHP. I have researched several possibilities and found that SOAP is the most accessible approach (I could be wrong, however) and have been basing the majority of my code on this link: https://www.howtoforge.com/talking-soap-with-exchange
I got up to the following part:
print_r($client->__getFunctions());
When I tried to test it out I got an error as followed:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'SERVER ADDRESS.WSDL' : failed to load external entity "SERVER ADDRESS.WSDL" in C:\xampp\DIRECTORY:4 Stack trace: #0 C:\xampp\DIRECTORY(4): SoapClient->SoapClient('SERVER ADDRESS') #1 {main} thrown in C:\xampp\DIRECTORY on line 4
Line 4 being :
$client = new SoapClient($wsdl);
I have researched the possible issues regarding this, enabled all the required things for PHP and researched other alternatives but I think the issue lies in the connection itself between Exchange and the code (connecting directly through the browser works fine).
To summarize my issues with a question: Is there a possible compatibility issue between the latest PHP and cURL (currently 7.2.1. and 7.56.0 respectively) and Exchange 2010?
Would it also be possible to maybe receive other suggestions on how I can tackle this issue?
Related
I'm pretty new at SOAP, but i didn't think this problem was going to give me such a headache. :-)
I have a WSDL at :
https://qas.sanitel.be/int/QAS_Sanitel_ExtInterfacingSvcs_v2/SanitelServices.asmx?wsdl
Seems to be OK, but it's over https. i think that's where my problem is.
I wrote several PHP scripts i found here on stackoverflow and google to get at least a function list, but anything i try gives me the same error :
I put the script on a wamp server, external host, external with SSL..
( ! ) Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://qas.sanitel.be/int/QAS_Sanitel_ExtInterfacingSvcs_v2/SanitelServices.asmx?wsdl=wsdl1' : failed to load external entity "https://qas.sanitel.be/int/QAS_Sanitel_ExtInterfacingSvcs_v2/SanitelServices.asmx?wsdl=wsdl1" in C:\wamp\www\sanitel.php:25 Stack trace: #0 C:\wamp\www\sanitel.php(25): SoapClient->SoapClient('https://WS4SNTR...', Array) #1 {main} thrown in C:\wamp\www\sanitel.php on line 25
I have the credentials , tried several authentications, everything gives me this error...
anyone see something i don't ? Thanks a lot !
I have a cloud server with CentOS 6, Apache 2.2, PHP 5.4 and i have one site with Magento.
And i try to use a Magento WebService and return this error:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://******.com/dev/index.php/api/soap/index/?wsdl=1' : failed to load external entity "http://******.com/dev/index.php/api/soap/index/?wsdl=1"
I search here and in google, and i try many changes in php.ini, but in all cases i don't have success.
I read in some cases this is a problem in server side, for bad configuration.
NoteĀ¹: SOAP is installed in server, in phpinfo() SOAP is enabled.
NoteĀ²: On another server was working normally.
Anyone have any ideia how to solve this?
Edit: The server use WHM/CPanel and i use EasyApache for install Apache, PHP. And use default configuration.
Edit2: This is just a simple sample code that uses the SOAP and error it returns:
Code: (first line of this code is a line 9, and line 13 is "$cli = new SoapClient($api_url_v1);")
<?php
$api_url_v1 = "http://site.com/dev/api/soap/?wsdl=1";
$username = '*********';
$password = '*********';
$cli = new SoapClient($api_url_v1);
//retreive session id from login
$session_id = $cli->login($username, $password);
//call customer.list method
$result = $cli->call($session_id, 'customer.list', array(array()));
?>
Error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://site.com/dev/api/soap/?wsdl=1' : failed to load external entity "http://site.com/dev/api/soap/?wsdl=1" in /home/******/public_html/test_soap.php:13 Stack trace: #0 /home/******/public_html/test_soap.php(13): SoapClient->SoapClient('http://site...') #1 {main} thrown in /home/******/public_html/test_soap.php on line 13
try to fetch the wsdl via webbrowser. if this does not work then you have an error in url. try www version of the urls, check for bad rewrites, check htaccess. you dont need https!
I am trying to create a soap connection using the standard php soap client and I believe it is all correctly coded, however I am receiving this error :
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl' : Start tag expected, '<' not found in C:\wamp\www\php\run.php:16 Stack trace: #0 C:\wamp\www\php\run.php(16): SoapClient->SoapClient('https://m2mconn...') #1 {main} thrown in C:\wamp\www\php\run.php on line 16
From what I have found online it seems one problem may be to do with the ports, however im not sure which ports to check/use or how to.
Im also unsure if it is something to do with my internet connection as it is a little strange being from one router to another.
Here is my code:
$client = new SoapClient("https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl");
I am trying using PHP with MSSQL Reporting Services, but without success... First, i tried using helloworld.php from SRSS SKD PHP, and returns this error:
Failed to connect to Reporting Service:
Make sure that the url (http://10.120.100.12/ReportServer/) and credentials are correct!
And trying using pure SoapClient:
Warning: SoapClient::SoapClient(http://10.120.100.12/ReportServer/ReportExecution2005.asmx) [function.SoapClient-SoapClient]: failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in C:\xampp\htdocs\estudos\index.php on line 5
Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity "http://10.120.100.12/ReportServer/ReportExecution2005.asmx" in C:\xampp\htdocs\estudos\index.php on line 5
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://10.120.100.12/ReportServer/ReportExecution2005.asmx' in C:\xampp\htdocs\estudos\index.php:5 Stack trace: #0 C:\xampp\htdocs\estudos\index.php(5): SoapClient->SoapClient('http://10.120.1...', Array) #1 {main} thrown in C:\xampp\htdocs\estudos\index.php on line 5
Have a extra IIS configuration to make?
i am sure that use the same login and password used in web browser version. Need something more?
Thanks,
Celso
I'm assuming you're passing username/password - in that case NTLM authentication might be the issue. I'd recommend trying to enable basic authenticaiton to see if the problem goes away: http://msdn.microsoft.com/en-us/library/cc281309.aspx
I am developing a website using PHP and mongodb. I access the mongodb with PECL-mongo, and have run into an annoyance. Every now and then, I get an error like this (I've anonymized the paths)
Fatal error: Uncaught exception 'MongoCursorException' with message 'couldn't get response header' in
/PATH/index.php:38 Stack trace: #0
/PATH/index.php(38): MongoCursor->rewind() #1
/PATH/template.inc(29): get_sidebar() #2
/PATH/index.php(13):
require_once('PATH/...') #3 {main} thrown in PATH/index.php on line 38
According to the documentation, this means:
The driver could not fetch a reply header from the database, so it
gave up. Check if the database is still up and the network is
connected and try the query again.
But I know that the database is up because I am doing this locally on my own machine over loopback. No connection is made to the outside world.
Simply trying again often works. Is this a possibly a bug in PHP's driver for mongo? Could this be a "miscompile" issue (I compiled from source, but with very benign flags, -march=native -O2)?
Has anyone seen this before?
Searching around, I only see references to some stupid facebook game having the same error.
EDIT: I just downgraded my PECL driver to version 1.1.4 and so far, the problem seems have gone away. So this may simply be a bug in the 1.2.x series. If anyone can shed any light on it, that would be great.
EDIT: I am not doing anything complex here, the code that is having the issue litterally looks like this:
$m = new Mongo();
$collection = $m->my_db->collection;
$results = $collection->find(array("favorite"=>true))->limit(5);
i solved this problem with get new version mogodb.dll
you can see http://www.mongodb.org/display/DOCS/PHP+Language+Center