PHP-SharePoint-Lists-API icon indicating copy to clipboard operation
PHP-SharePoint-Lists-API copied to clipboard

Error (HTTP) Bad Request

Open jjhollywood opened this issue 8 years ago • 2 comments

Hi, I'm trying to connect to a SP 2010 server (I've the credentials in order to login but I'm not the administrator). I've followed your instruction, but I'm facing the error message "Error (HTTP) Bad Request", propably raised by SoapFault().

Could you please suggest a WA in order to progress further? My goal would be read data on our SP website from this custom php application.

Below the few lines of code that raised the error:

require DIR . '/vendor/autoload.php'; use Thybag\SharePointAPI; $sp = new SharePointAPI('xx', 'xx', 'xx'); $listContents = $sp->read('<list_name>,30');

Thanks in advanced

jjhollywood avatar Dec 02 '16 15:12 jjhollywood

Hi jjhollywood,

Weird you get an error from just a basic read. Is there anything a bit special with the list name at all?

From some googling around, its also suggested the error can occur if the SP site you are using contains whitespace in the path, although I'm unsure if that's relevant in your case.

Just for some additional context, can i also just check which auth mechanism your using? (ntlm/default basic auth)

Sorry I can't be more help, "Error (HTTP) Bad Request" doesn't provide a huge amount to go on (if you can get any more detail on the error, that'd help a lot).

thybag avatar Dec 15 '16 23:12 thybag

surely

$listContents = $sp->read('<list_name>,30');

should be

$listContents = $sp->read('<list_name>',30);

Quote enclosing the list name and not including the limit?

densonclan avatar Jan 17 '17 09:01 densonclan