Error on connecting to GoogleDocs

Error on connecting to GoogleDocs

by Christian Peters -
Number of replies: 0

I'm not able to get gDocs Repository up & running.

The formal error messages  reads

ERROR: Invalid JSON string

( ! ) Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Start tag expected, '<' not found in C:\xampp\htdocs\moodle\lib\googleapi.php on line 293
Call Stack
#TimeMemoryFunctionLocation
10.0011426168{main}( )..\repository_ajax.php:0
20.486619833832repository_googledocs->get_listing( )..\repository_ajax.php:141
30.618819840640google_docs->get_file_list( )..\lib.php:85
430.619319840976SimpleXMLElement->__construct( )..\googleapi.php:293



( ! ) Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: couldn't connect to host in C:\xampp\htdocs\moodle\lib\googleapi.php on line 293
Call Stack
#TimeMemoryFunctionLocation
10.0011426168{main}( )..\repository_ajax.php:0
20.486619833832repository_googledocs->get_listing( )..\repository_ajax.php:141
30.618819840640google_docs->get_file_list( )..\lib.php:85
430.619319840976SimpleXMLElement->__construct( )..\googleapi.php:293



( ! ) Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in C:\xampp\htdocs\moodle\lib\googleapi.php on line 293
Call Stack
#TimeMemoryFunctionLocation
10.0011426168{main}( )..\repository_ajax.php:0
20.486619833832repository_googledocs->get_listing( )..\repository_ajax.php:141
30.618819840640google_docs->get_file_list( )..\lib.php:85
430.619319840976SimpleXMLElement->__construct( )..\googleapi.php:293

{"error":"Exception - String could not be parsed as XML","stacktrace":"* line 293 of \\lib\\googleapi.php: Exception thrown\n* line 293 of \\lib\\googleapi.php: call to SimpleXMLElement->__construct()\n* line 85 of \\repository\\googledocs\\lib.php: call to google_docs->get_file_list()\n* line 141 of \\repository\\repository_ajax.php: call to repository_googledocs->get_listing()\n","debuginfo":null,"reproductionlink":"http:\/\/localhost\/moodle\/"}

I've done some debugging, and the line in question is

$xml = new SimpleXMLElement($content);

I've run moodle in netbeans debug mode and the var $this contains the error "couldn't connect to host".

I've also done some research and tried various solutions, but I wasn't able to track down, what's coming back from google (I guess nothing, thatsway the error with the host).

Any ideas about the problem?

Thanks.

EDIT: Is it possible, that this is because of a firewall (I'm at my company right now).

Average of ratings: -