Old site with unsupported PHP version and ModX - Can anything be done?

The situation:

  • a site has been working on Evolution 1.0.2 for a lot of years
  • suddently PHP 5.4 is no longer supported by the hosting provider (sure, the end-of-life happened a while ago, but maybe rather than overriding default .htaccess silently and making the site unusable, you should tell your users about it?)
  • changing .htaccess to use php 5.4 just for this site does not work; the earliest supported version is PHP 5.6
  • there are many errors in error_logs now, not just mysql_blah ones
  • I managed to bring the site back by changing some main mysql_blah to mysqli_blah calls, however, the manager is not working, neither the GoRevo upgrade tool that I purchased

Question:
Do I need to start from scratch (I can download the site now, most of it at least, using one of the website copiers like HTTRACK and move to WordPress, new ModX, etc.)? Anoher alternative would be to sit there and painstakingly change functions in the current ModX code to support PHP5.6. Or I could try to find the earlier version and hope that there is something that helps migration, e.g. migrate from 1.0.2 to some later Evo version that would automatically convert relevant PHP stuff.

What is the most effective way to migrate in this case? Or is all hope lost?

Thanks for taking time to read this and maybe even reply :-)…

Hi, not sure if this can help, but if I were you I would install your website locally on your computer.
You can use something like mamp, but you may have to download an older version, as I don’t even know if this is shipped with php 5.4.

Then you could copy/paste your content to a newer version of modx.
Good luck!

P.S. Or maybe you can go for the lazy option and just drop your database into mysql and grab the content directly :sweat_smile: . I hope for you that you don’t have too much content to backup.

Easiest thing to do to get the site up and running is to just upgrade it, Evolution is still supported and is now called Evolution CMS

https://evo.im/

I managed to bring the old site up, debugging and changing old ModX source PHP files. I even managed to migrate it to Revolution. One weird problem though. Every page in Revolution is using old Evolution template (not the Revolution template that was successfully migrated). How is this even possible???

Actually it’s not the template it’s the page that resolves with /page-alias rather than /revo/page-alias. I think it’s something to do with .htaccess directives

Ok, I got it. I just needed to

  1. change the “RewriteBase /” directive in default .htaccess file to “RewriteBase /revo-folder/
  2. add to template head the following: <base href="http://www.mysite.org/revo-folder/" /> (because I have relative URLs everywhere, like “images/logo.png”)

A very nice link that allows you to play with your .htaccess file: https://htaccess.madewithlove.be/

I found one quite non-intuitive thing, which I will mention in a separate question…

It is probably a better idea to have <base href="[[!++site_url]]" /> in the template head and then make sure that in the configuration file core/config/config.inc.php the base_url is set correctly.

$modx_base_url= '/revo-folder/';
1 Like