We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11054
    • 59 Posts
    I have a ModX 1.0.1 installation that has been running for a long time with no flaws or issues. Today when I checked the site everything had gone wrong. I received this parser error.

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: mysql_connect() [function.mysql-connect]: Premature end of data (mysqlnd_wireprotocol.c:554)
    Error type/ Nr.: Warning - 2
    File: /usr/www/users/ebhfh/manager/includes/extenders/dbapi.mysql.class.inc.php
    Line: 89
    Line 89 source: if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd, true))) {

    Parser timing
    MySQL: 0.0000 s (0 Requests)
    PHP: 0.0513 s
    Total: 0.0513 s

    The page continued to try and connect and the parser timing error continued to fill down the page each time it tried to connect to the db.

    I checked the db and the password/user are still the same.

    On this post: http://modxcms.com/forums/index.php/topic,2091.0.html

    xwisdom suggests running this script in my PHPadmin. Would this fix anything here? I don’t want to run the script before I really know what it does since I’m not 100% familiar with mySQL.
    SELECT DISTINCT sc.published FROM `modx`.dry_site_content sc LEFT JOIN `modx`.dry_document_groups dg on dg.document = sc.id WHERE (sc.id IN (19) AND sc.published=1 AND sc.deleted=0 ) AND (sc.privateweb=0) LIMIT 1

    Thanks in advance for your help.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That has nothing to do with your issue. That was checking to see if a specific resource was available in that person’s database.

      Has your hosting provider upgraded the MySQL version, or the PHP version?

      http://stackoverflow.com/questions/4807072/windows-7-php-mysql-connection-issues

        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 11054
        • 59 Posts
        You were absolutely correct. I called the hosting company and they had performed a PHP upgrade that required us to change the passwords on the database so they were stored more securely.

        Thanks again for the quick response!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Google is your friend. All I did was copy/paste that error message into a Google search and that was one of the two obviously relevant results.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org