1

I have on my ftp space(folder test1) the following directory/file:

  • /Thybag
  • test.php

I am using the API for SP: THYBAG

This is my code php:

require_once __DIR__ . '/Thybag/SharePointAPI.php';
require_once __DIR__ . '/Thybag/Auth/SharePointOnlineAuth.php';
require_once __DIR__ . '/Thybag/Auth/SoapClientAuth.php';
require_once __DIR__ . '/Thybag/Auth/StreamWrapperHttpAuth.php';
require_once __DIR__ . '/Thybag/Service/ListService.php';   
require_once __DIR__ . '/Thybag/Service/QueryObjectService.php';
include "/Thybag/SharePointAPI.php";

$sp = new SharePointAPI('xx@test.it', 'pass', 'https://xx.sharepoint.com/sites/HD1/_vti_bin/Lists.asmx?wsdl', 'SPONLINE');
$listContents = $sp->read('<list_name>'); 
foreach($listContents as $item){
  var_dump($item); 
}

When I run it I get the following error: Fatal error: Class 'SoapClient' not found in /membri/xxx/test1/Thybag/Auth/SharePointOnlineAuth.php on line 11

Where do I go wrong?

Enzo
  • 597
  • 1
  • 8
  • 22
  • You need to install and enable PHP's Soap-extension. That library seem to be using it to communicate with SharePoint's API. – M. Eriksson Apr 02 '21 at 14:37
  • My domain does not allow Soap to be enabled, are there any alternatives? – Enzo Apr 02 '21 at 15:19
  • The library you're using seem to depend on and use PHP's SoapClient extension so if you can't install/enable that, you can't use that library. Or is it in SharePoint you're not allowed to enable their Soap service (unclear what you mean by _"my domain does not allow Soap to be enabled"_?) Either way, you won't be able to use this lib. I don't know if there are any other way. You need to do more research. – M. Eriksson Apr 02 '21 at 15:40

0 Answers0