17452 Posts in 4473 Topics by 1971 members
|Go to End|
29 July 2008 at 10:22pm
When I try to register a new forum user I get the following error message:
XML Parsing Error: junk after document element
Line Number 2, Column 1:<b>Notice</b>: ip2country(220.127.116.11): geoiplookup executable returned nothing. in <b>/home/fhlinux149/s/sop.org.uk/user/htdocs/sapphire/security/Geoip.php</b> on line <b>300</b><br />
Can anyone help?
29 July 2008 at 11:11pm
I believe the ip2country lookup (auto detect your location) isnt working as it is disabled on most servers. There is a ticket to make this fail 'sliently' rather then return any notices or errors. Then The XML error is caused because of the notice being outputted. This will probably be part of the next release.
So I dont know the proper way to solve this but it looks to me like 3 things you could do
1) Work out way ip2county isnt working and enable it on your server (pssh too much work? and its not that useful)
2) Turn off your PHP notices - add error_reporting(E_ALL ^ E_NOTICE); to your mysite/_config.php file or set it in your PHP.ini file on your server setup (notices are some times useful so turning them off might hide some problems with your code)
3) Turn off Strict XML checking in your template so that it doesnt fail with a notice outputted - to do this remove the <? xml bit at the top of the file - themes/yourtheme/templates/Page.ss
29 July 2008 at 11:48pm
Thanks this was very useful.
I've already spent far to long examining ip2country() to no avail, so I've turned off the strict XML checking, that at least lets users register. However the unsightly php error reporting, still remains - error_reporting(E_ALL ^ E_NOTICE); seems to not work, but error_reporting(E_ERROR | E_WARNING | E_PARSE); gives the desired result.
|Go to Top|