Closed iibis closed 10 years ago
Following up to my own post, using thybag/PHP-SharePoint-Lists-API/src, and by downloading (Lists.asmx?WSDL) XML file "manually", now I get the following. I believe SSLv3 is disabled in our SharePoint2010. So, I would like to know how to set SSL_version at default or to TLS. Thanks.
thrown in C:\xyz\Thybag\Auth\SoapClientAuth.php on line 126
Resolved: Commenting out line 107 in Thybag\Auth\SoapClientAuth.php got my lists from SharePoint2010. //curl_setopt($ch, CURLOPT_SSLVERSION, 3); Still I have to manually download the file though. I know the URL link works in browser and in nusoap php.
thybag SharePointAPI's php codes under Auth folder use CURLOPT_SSLVERSION 3.
As per http://php.net/manual/en/function.curl-setopt.php : "Your best bet is to not set this and let it use the default. Setting it to 2 or 3 is very dangerous given the known vulnerabilities in SSLv2 and SSLv3."
I want it to use TLSv1 instead. If I do the following change I get code dump.
From curl_setopt($ch, CURLOPT_SSLVERSION, 3); To curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
What would the best way to enable TLS or leave it at default? We do use NTLM.
If I do not make the above change I get SOAP-ERROR: PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://sharepoint/sites/subsite/_vti_bin/Lists.asmx?wsdl' : failed to load external entity "https://sharepoint/sites/subsite/_vti_bin/Lists.asmx?wsdl" in C:\xyz\Thybag\Auth\SoapClientAuth.php on line 67 PHP Fatal error: Uncaught exception 'Exception' with message 'Unable to locate WSDL file. faultcode=0,faultstring=SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://sharepoint/sites/subsite/_vti_bin/Lists.asmx?wsdl' : failed to load external entity "https://sharepoint/sites/subsite/_vti_bin/Lists.asmx?wsdl" ' in C:\xyz\Thybag\SharePointAPI.php:183 Stack trace:
0 test_thybag.php(24): Thybag\SharePointAPI->__construct('user', 'passwd', 'https://sha...', 'NTLM')
1 {main}
thrown in C:\xyz\Thybag\SharePointAPI.php on line 183
If I use nusoap, for the same wsdl URL, I can successfully get list items as follows: $listName=:MyList"; $rowLimit="1000"; $client = new nusoap_client($wsdl, true); $client->setCredentials('', '', 'ntlm'); $client->setUseCurl(true); $client->useHTTPPersistentConnection(); $client->setCurlOption(CURLOPT_USERPWD, 'user:passwd'); $xml ='
'; $result = $client->call('GetListItems', $xml); //This gets list items fine.
Please let me know what the fix is. Thanks.