We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24495
    • 407 Posts
    Hi, for a client I should set up a site at a host with PHP 4/5 and ONLY MySQL 5.0.51. The "technical support" can’t say anything about the versioning/changing/bug fixing rolleyes

    I’ve read some threads about problems with this db version. Should we use this host or is it better to change? And what are the main problems? Can I use the available fixes found here in forum without problems if the hoster changes the db anytime?
    • Run away!

      Nothing will be sortable. Ditto and Wayfinder will return odd results.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 5274
        • 177 Posts
        Quote from: rthrash at Apr 04, 2008, 01:05 PM

        Run away!

        Nothing will be sortable. Ditto and Wayfinder will return odd results.

        Agreed! I run my own servers and fell back to a previous MySQL 5.0.37 version because of the problems I ran into with 5.0.51.
          • 24495
          • 407 Posts
          Quote from: rthrash at Apr 04, 2008, 01:05 PM

          Run away!

          Nothing will be sortable. Ditto and Wayfinder will return odd results.
          Sounds clear, thanks.
          Edit:
          Found just now a plugin for Wordpress at: http://schnurpsel.de/wordpress-und-die-suboptimale-mysql-optimierung-5051-74/ (in German)
          <?php
          /*
          Plugin Name: 123 No Group By ID
          Plugin URI: http://schnurpsel.de/wordpress-und-die-suboptimale-mysql-optimierung-5051-74/
          Description: Ändert bei WP das GROUP BY id in GROUP BY post_date (Problem ab MySQL 5.0.51).
          Author: Ingo Henze
          Version: 0.12
          Author URI: http://putzlowitsch.de/
          */ 
          
          	// GROUP BY auswerten
          	function plw123ngb_posts_groupby( $groupby ) {
          		if( preg_match( "/(|[ ,.])id(|[ ,])/i", $groupby ) ) {
          			// sonst GROUP BY auf post_date setzen
          			$groupby = 'post_date';
          		}
          		return $groupby;
          	}
          
          	add_filter( 'posts_groupby', 'plw123ngb_posts_groupby' );
          ?>

          Is it possible (for the skilled coders cool) to adapt this plugin usable for MODx? Instead of hacking the snippets?
            • 22629
            • 194 Posts
            I am running MODx successfully on MySQL 5.0.51a with a slight fix to the TreeView. As Ryan said, Wayfinder and Ditto will return weirdly-sorted results unless they’re changed in the same way.

            The basic rule with this MySQL version is (from my own experience) is: don’t use GROUP BY with ORDER BY.

            I wouldn’t recommend the MODx team to fix these issues as a) it’s not MODx that’s at fault and b) the bug is supposedly fixed in MySQL 5.0.52 whenever it’s released.

            If you know SQL well you can easily workaround the GROUP/ORDER BY bug by doing the grouping as a subquery, and order’ing the outer query instead of doing it all in one query.

            http://bugs.mysql.com/bug.php?id=32202
              Andy Shellam | www.networkmail.eu | @Pandy06269 @NetworkMail

              modx Revolution 2.2.6
              Windows 2012 | IIS 8 | php 5.4.11 | MySQL 5.5.29

              Content-Managed Websites Built on MODX
              • 22629
              • 194 Posts
              Quote from: andyccn at Apr 05, 2008, 06:52 PM
              Wayfinder and Ditto will return weirdly-sorted results unless they’re changed in the same way.

              Someone has posted a fix for Wayfinder on my original post on this subject: view the post
                Andy Shellam | www.networkmail.eu | @Pandy06269 @NetworkMail

                modx Revolution 2.2.6
                Windows 2012 | IIS 8 | php 5.4.11 | MySQL 5.5.29

                Content-Managed Websites Built on MODX
                • 24495
                • 407 Posts
                Thanks andyccn but the best way for my client is to change the hoster. The hosting company (strato.de) is very inflexible. After years of customer requests they’ve activated the mod_rewrite capabilities some weeks ago. At this time as a countermove they killed the option choosing MySQL version 4 or 5. Now you can only use the 5.0.51 and the so called rolleyes technical hotline don’t know any about updates/changes. And all in all the performance of strato’s db is bad. Instead of hacking snippets we will change.