-
Notifications
You must be signed in to change notification settings - Fork 96
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
No XML document #149
Comments
HI found a solution to the issue? Got similar error: Fatal error: Uncaught Exception: Error (Client) looks like we got no XML document,more= in /home/xxxxxxxx/public_html/xxxxxxxx/sharepoint/src/Thybag/SharePointAPI.php:1016 Stack trace: #0 /home/xxxxxxxx/public_html/xxxxxxxx/sharepoint/src/Thybag/SharePointAPI.php(446): Thybag\SharePointAPI->onError(Object(SoapFault)) #1 /home/xxxxxxxx/public_html/xxxxxxxx/sharepoint/index.php(22): Thybag\SharePointAPI->read('Change Manageme...') #2 {main} thrown in /home/xxxxxxxx/public_html/xxxxxxxx/sharepoint/src/Thybag/SharePointAPI.php on line 1016 |
No solution yet. |
Hi Chris, Thanks for you response, hope the creators of thybag know how to fix it. |
Hi both, Do you have any example code that can replicate the bug at all? (Also be good to know what SP version your running against / what auth method your using). The May also be worth checking its nothing to do with trailing white space / the BOM in the php file itself ( https://stackoverflow.com/questions/4313952/soap-looks-like-we-got-no-xml-document ) |
Hi, Mine is just a form that accepts an email address and edits a field in Sharepoint online...this is the relevant part of the page:
|
require_once('SharePointAPI.php'); use Thybag\SharePointAPI; $data = $sp->read('Change Management');
|
Ah, i think that may well be a headers sent to early issue. (basically any whitespace or content before the php) Basically having any code before the Would suggest moving the SharePoint api php right to the top of the file and having all other markup after its done requesting whatever data you need. |
Hi Thybag, Thanks for your response. Striped down the script to only have below. But got the same error (with debug on): `<?php require_once('SharePointAPI.php'); use Thybag\SharePointAPI; $data = $sp->read('List Name'); |
Hi, I also tried with no luck...I stripped everything except the sharepoint code out, but got the same error:
|
Today it started working again suddenly without changing anything to the code. |
Weird...mine is still not working |
mine stopped working an hour later. |
Quick fix. Try replacing
with
on line 136 in SharePointOnlineAuth.php. Sharepoint Online (Office365) is no longer returning If someone wants to make a pull request or include a cookie parser, feel free to improve on this. |
@thybag Thanks so much! In your commit Maybe in the future a Cookie Parser could be implemented (here's one such example on StackOverflow). |
🤦♂️ Fixed. |
That seems to have fixed my issue...thank you very much. |
See: thybag/PHP-SharePoint-Lists-API#149 (comment) for full details.
I have had this script running for months, but this morning I am getting the following error:
[18-Dec-2018 12:02:50 Australia/Melbourne] PHP Fatal error: Uncaught Exception: Error (Client) looks like we got no XML document,more= in /home/jppporta/public_html/advocate/email-unsub/Thybag/SharePointAPI.php:1016
Stack trace:
#0 /home/jppporta/public_html/advocate/email-unsub/Thybag/SharePointAPI.php(446): Thybag\SharePointAPI->onError(Object(SoapFault))
#1 /home/jppporta/public_html/advocate/email-unsub/Thybag/Service/QueryObjectService.php(210): Thybag\SharePointAPI->read('JPP Contact Lis...', 1, Object(Thybag\Service\QueryObjectService), NULL, NULL, NULL)
#2 /home/jppporta/public_html/advocate/email-unsub/sharepoint_unsub.php(26): Thybag\Service\QueryObjectService->get()
#3 {main}
thrown in /home/jppporta/public_html/advocate/email-unsub/Thybag/SharePointAPI.php on line 1016
Any ideas?
The text was updated successfully, but these errors were encountered: