Remember me? forgot password | register

134 Posts in 59 Topics by 69 members

Jump to:

bugs (temp)

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

bugs (temp) » Forum-module, register new user problem
Page: 1 go to end Reply
Author Topic: Forum-module, register new user problem 628 views
  • RobertM
    RobertM's avatar
    Community Member
    26 posts
    3 SilverStripe Sites

    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
    Core Development Team
    1263 posts
    3 SilverStripe Sites 2 SilverStripe Themes

    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
    RobertM's avatar
    Community Member
    26 posts
    3 SilverStripe Sites

    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.

    628 views
go to top Reply

Currently Online:

mapes911, kudesign, Matt Hardwick, simon_w

Welcome to our latest member: patrics