We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26063
    • 20 Posts
    I have all of a sudden started getting a couple of messages a day about a Parse Error in eForm. The form is working correctly and I do receive an email when someone makes a request. So eForm seems to be working fine. With the amount of times and how frequently this has been occurring during the past several weeks, I am wondering if the site is being hit by bots?


    « MODX Parse Error »
    MODX encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
    PHP error debug
    Error : htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument
    ErrorType[num] : WARNING[2]
    File : /home/saintmon/public_html/assets/snippets/eform/eform.inc.php
    Line : 701
    Source : $value = htmlspecialchars($value, ENT_QUOTES, $modx->config['modx_charset']);
    Basic info
    REQUEST_URI : http://www.saintmonicaconverse.net/index.php?id=19
    Resource : [19]Contact Us
    Current Snippet : eForm
    Referer : http://www.saintmonicaconverse.net/index.php?id=19
    User Agent : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705)
    IP : 124.73.137.20
    Benchmarks
    MySQL : 0.0024 s (2 Requests)
    PHP : 0.0114 s
    Total : 0.0138 s
    Memory : 3.12239837646 mb

    Backtrace
    1 DocumentParser->executeParser()
    index.php on line 144
    2 DocumentParser->prepareResponse()
    manager/includes/document.parser.class.inc.php on line 1579
    3 DocumentParser->outputContent()
    manager/includes/document.parser.class.inc.php on line 1681
    4 DocumentParser->parseDocumentSource()
    manager/includes/document.parser.class.inc.php on line 596
    5 DocumentParser->evalSnippets()
    manager/includes/document.parser.class.inc.php on line 1461
    6 DocumentParser->_get_snip_result()
    manager/includes/document.parser.class.inc.php on line 1060
    7 DocumentParser->evalSnippet()
    manager/includes/document.parser.class.inc.php on line 1147
    8 eval()
    manager/includes/document.parser.class.inc.php on line 1009
    9 require()
    manager/includes/document.parser.class.inc.php(1009) : eval()'d code on line 1
    10 eForm()
    assets/snippets/eform/snippet.eform.php on line 100
    11 formMerge()
    assets/snippets/eform/eform.inc.php on line 666
    12 htmlspecialchars()
    assets/snippets/eform/eform.inc.php on line 701
      • 13226
      • 953 Posts
      I am not an expert with this but have had a similar problem in the past. I changed the manager character set to UTF-8 and that solved my issue.

      • What version of eForm is in use
      • What version of Evo is in use
      • What charset is set in the manager (Tools => Configuration => Site Tab - Character encoding)

      Check:

      • If your server has been updated - what PHP version is in use
      • If your database has been modified

      Searching on this topic you will find that as of PHP5.4 the default charset for htmlspecialchars is "UTF-8".

      If, in your manager, you are using anything other than UTF-8 that may well be the problem, so long the PHP version is 5.4+