Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Forum-module, register new user problem

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

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

Page: 1
Go to End
Author Topic: 1411 Views
  • RobertM
    Avatar
    Community Member
    26 Posts

    Forum-module, register new user problem Link to this post

    When I try to register a new forum user I get the following error message:

    XML Parsing Error: junk after document element
    Location: http://www.sop.org.uk/ForumMemberProfile/register
    Line Number 2, Column 1:<b>Notice</b>: ip2country(78.86.209.161): 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?

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Forum-module, register new user problem Link to this post

    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

  • RobertM
    Avatar
    Community Member
    26 Posts

    Re: Forum-module, register new user problem Link to this post

    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.

    1411 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.