GetSimple Support Forum

Full Version: Uncaught exception 'Exception' with message 'String could not be parsed as XML'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Quote:PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /admin/inc/logging.class.php:44
Stack trace:
#0
/admin/inc/logging.class.php(44): SimpleXMLElement->__construct('<?xml version="...')
#1
/admin/inc/login_functions.php(36): GS_Logging_Class->__construct('failedlogins.lo...')
#2
/admin/inc/common.php(250): include_once('/home/r/r7nebor...')
#3
/admin/index.php(14): include('/home/r/r7nebor...')
#4 {main}
thrown in
/admin/inc/logging.class.php on line 44
So, logg files default have ANSI encoding, but parser required UTF8.
In my incident i use cirilliс login and authorization took place successfully. But once at authorization the server started giving out a mistake No. 500. Probably I made a mistake in the form of my template that led to rewriting of log file, in a consequence of that at authorization there was the above mistake (№500).
Thus, a change ANSI to UTF8 at log files (/data/other/loggs/) and the problem was resolved.
In order to avoid this problem from other users, edit the php code to log files were created in UTF encoding.
Can you detail exactly what you did to cause the issue? A cryllic username?
Was this after some upgrade ? Did you simply delete the file and let it recreate or is the xml header wrong ?
GetSimple CMS 3.2.1
Install, set login name on cyrillc, do some mistake -> GetSimple write log file at ANSI. But parser required UTF8, so if I have any not english symbols at log files - PHP Fatal error.
If parser work with UTF8, why log files created with ANSI? English ANSI = UTF, and all work Ok, but any other language and we have error.
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/615

logs will have to be cleared, but this should fix it.

Code:
    <entry>
        <date>Tue, 30 Jul 2013 10:23:24 -0500</date>
        <IP_Address><![CDATA[161.45.228.176]]></IP_Address>
                      <Username><![CDATA[Интерне́т]]></Username>
        <Reason><![CDATA[Invalid User]]></Reason>
    </entry>