Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have problem with Read, Write, Update query #156

Open
Br0wserz opened this issue Aug 29, 2019 · 0 comments
Open

I have problem with Read, Write, Update query #156

Br0wserz opened this issue Aug 29, 2019 · 0 comments

Comments

@Br0wserz
Copy link

Br0wserz commented Aug 29, 2019

My problem is an generic error, i think.

`$sp = new SharePointAPI('username', 'password', 'sharepoint site', 'NTLM');

    $a = $sp->query('label')->where('docicon', '=', 'pdf')->get(); 
    $a = $sp->read('label, NULL, array('richiedente'=>'Calcagni Cristiano')); 
    $sp->update('laravel','1', array('cespite'=>'5555'));
    $sp->delete('laravel', '1');

return $a;
`

When i try to refresh the page with this code the result is:
Exception in SoapClientAuth.php line 129: Error

In the line 129 there is bold line below:
if (($info = curl_getinfo($ch)) && $info['http_code'] == 200) {
return $response;
}
else {
if ($info['http_code'] == 401) {
throw new \Exception ('Access Denied', 401);
}
else {
if (curl_errno($ch) != 0) {
throw new \Exception(curl_error($ch), curl_errno($ch));
}
else {
throw new \Exception('Error', $info['http_code']);
}

I can read only with this general function
$a = $sp->query('label')->get();

that return me a json data only

Am i doing wrong something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant