Firefox Error 'No Element Found'

Firefox error 'no element found'

Firefox is expecting to get something it can parse as XML back, and throwing an XML parsing error when it gets an empty response.

Before your PHP calls "exit()", use

header('Content-Type: text/plain');

and Firefox will not try to parse the response as XML, and there should be no error.

SSRS 2008 will not load when using firefox XML Parsing Error: no element found Line Number 1, Column 1:

  1. Type about:config in the address bar [press return/enter]
  2. In "Search" type negotiate
  3. Find network.negotiate-auth.trusted-uris and double click
  4. Type in your SSRS server http://[mySSRSserver] and click OK
  5. Restart Firefox and http://[mySSRSserver]/Reports/Pages/Folder.aspx should load, you might also have to add the value to network.negotiate-auth.delegation-uris

Returning JSON from a PHP Script

While you're usually fine without it, you can and should set the Content-Type header:

<?php
$data = /** whatever you're serializing **/;
header('Content-Type: application/json; charset=utf-8');
echo json_encode($data);

If I'm not using a particular framework, I usually allow some request params to modify the output behavior. It can be useful, generally for quick troubleshooting, to not send a header, or sometimes print_r the data payload to eyeball it (though in most cases, it shouldn't be necessary).



Related Topics



Leave a reply



Submit