Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Forum-module, register new user problem

Go to End

3 Posts   1663 Views


Community Member, 26 Posts

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( geoiplookup executable returned nothing. in <b>/home/fhlinux149/s/</b> on line <b>300</b><br />

Can anyone help?


Forum Moderator, 5523 Posts

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/


Community Member, 26 Posts

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.