We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15861
    • 24 Posts
    I’ve got a site that we finally got working on a Nuvox host. They ended up installing the latest versions of PHP and MySQL to update their ancient specs. Now everything was working just fine until about midnight last night. I was adding a couple of pages that had MaxiGallery calls (those types of pages make up most of the site!) when I needed to add a new chunk, and noticed that all of the chunks had disappeared and it was giving me the following error:
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /html/manager/actions/resources.static.php on line 17
    No results found

    I’m also having problems with the pages throwing memory errors. I’ve increased my memory in php.ini and a phpinfo() shows it’s taking the settings, but nothing is changing with the out of memory errors on pages that make a gallery call.

    Any ideas how to fix this? The client is getting impatient and irritated so I need to resolve this as fast as possible. Any help would be greatly appreciated!

      • 7231
      • 4,205 Posts
      Based on the error it looks like they may have updated mysql to 5.0.51 which has a known bug. Check what version of MySQL they upped to.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 15861
        • 24 Posts
        Hmm... while I had been told they were upgrading to MySQL 5, running phpinfo() shows my they’re using version 4.1.12 which meets the ModX minimum at least. However, the problem is still there. It seems to be getting caught in a loop. I’ve set the memory limits in a php.ini in the root directory to 24M, 32M and 64M. I have it echoing the memory limit and it shows that it’s working in the phpinfo file. However, each time the exact same amount of memory is shown as being needed by the error.

        Any other ideas? I’m stuck here.

        Thanks!
        Lonnie
          • 7231
          • 4,205 Posts
          Is there anything suspicions in the System Events log?
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 15861
            • 24 Posts
            Tons of Parser Errors... which are the same errors that show up on the website. Here it is:


            MODx encountered the following error while attempting to parse the requested resource:
            « Execution of a query to the database failed - Out of memory (Needed 3355440 bytes) »
            SQL: SELECT DISTINCT gal_id FROM modx_maxigallery

            I went into the resources.static.php file to echo out the sql that’s being generated, and here it is...


            SQL = SELECT `www_laceybros_com`.`modx_site_htmlsnippets`.name as name, `www_laceybros_com`.`modx_site_htmlsnippets`.id, `www_laceybros_com`.`modx_site_htmlsnippets`.description, `www_laceybros_com`.`modx_site_htmlsnippets`.locked, if(isnull(`www_laceybros_com`.`modx_categories`.category),’uncategorized’,`www_laceybros_com`.`modx_categories`.category) as category FROM `www_laceybros_com`.`modx_site_htmlsnippets` left join `www_laceybros_com`.`modx_categories` on `www_laceybros_com`.`modx_site_htmlsnippets`.category = `www_laceybros_com`.`modx_categories`.id ORDER BY 5,1

            Unfortunately, my SQL isn’t the strongest, but at first glance, I don’t see anything wrong this code. Oh, and this is what shows up on the Chunks page, but I have a feeling if we can get this cleared up, the rest will start working again.

            Thanks.
              • 7231
              • 4,205 Posts
              Try running the query directly in phpMyAdmin and see if it gives a better error. I tried it on my server and it worked fine (editing it to reflect my database).

              I can’t find anything wrong. Here go some guesses (brain farts):
              Maybe the host upgraded their host while you were working and then downgrded again causing this error. Or their upgrade was flawed.

              Do you have multiple MaxiGallery calls on the same page? Are your Galleries huge..100s of pictures?

              Turn off the Search Highlight plug-in, this may have a bug (I just helped another user where this was causing a problem).

              Also clear out the cache since the cache could be corrupted.
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]