Okay so I updated to 2.3.6 because I was having issues with my restore and it seems to be working. Now I'm trying to upgrade the PHP and I get 500 Error when I do.
I got this error log, but not sure if it helps.
[2015-09-18 01:04:44] (ERROR in xPDOConnection::connect @ /home2/weeeeeeee/public_html/core/xpdo/xpdo.class.php : 3046) SQLSTATE[HY000] [2019] Can't initialize character set (path: /usr/share/percona-server/charsets/)
[2015-09-18 01:04:44] (ERROR in xPDOConnection::connect @ /home2/weeeeeeee/public_html/core/xpdo/xpdo.class.php : 3046) SQLSTATE[HY000] [2019] Can't initialize character set (path: /usr/share/percona-server/charsets/)
[2015-09-18 01:04:44] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSystemSetting`.`key` AS `modSystemSetting_key`, `modSystemSetting`.`value` AS `modSystemSetting_value`, `modSystemSetting`.`xtype` AS `modSystemSetting_xtype`, `modSystemSetting`.`namespace` AS `modSystemSetting_namespace`, `modSystemSetting`.`area` AS `modSystemSetting_area`, `modSystemSetting`.`editedon` AS `modSystemSetting_editedon` FROM `zz_system_settings` AS `modSystemSetting` -
[2015-09-18 01:04:44] (ERROR in xPDOConnection::connect @ /home2/weeeeeeee/public_html/core/xpdo/xpdo.class.php : 3046) SQLSTATE[HY000] [2019] Can't initialize character set (path: /usr/share/percona-server/charsets/)
[2015-09-18 01:04:44] (ERROR in xPDOConnection::connect @ /home2/weeeeeeee/public_html/core/xpdo/xpdo.class.php : 3046) SQLSTATE[HY000] [2019] Can't initialize character set (path: /usr/share/percona-server/charsets/)
[2015-09-18 01:04:44] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSystemSetting`.`key` AS `modSystemSetting_key`, `modSystemSetting`.`value` AS `modSystemSetting_value`, `modSystemSetting`.`xtype` AS `modSystemSetting_xtype`, `modSystemSetting`.`namespace` AS `modSystemSetting_namespace`, `modSystemSetting`.`area` AS `modSystemSetting_area`, `modSystemSetting`.`editedon` AS `modSystemSetting_editedon` FROM `zz_system_settings` AS `modSystemSetting` -
[2015-09-18 01:04:44] (FATAL) Could not load core MODX configuration!
Just upgrading your PHP can cause a problem if the version of the MySQL client it has is too far off from the version of MySQL it's trying to connect to.
Right now, my basic MAMP platform is using PHP 5.6.10, MySQL 5.5.42 with its default charset and collation set to UTF-8 Unicode. The MySQL client that PHP is using is 5.0.11.
For MODX, the important bits are in the core/config/config.inc.php, in the top part that deals with the database connection, especially the lines for the $database_connection_charset and the $database_dsn.
Would this be caused by the fact I'm still on PHP 5.2.17? I tried to change the PHP version to use on cpanel and then when I did, my site broke. The only page I could see correctly was mysite.com. Mysite.com/blog was very weird.
Just to confirm, yes that could definitely be the reason - MODX 2.4 requires PHP 5.3 and the package manager is one of the areas that can break if you're on an older version. There should have been a configuration warning about that on the dashboard too
Wow. What a doozy. It was a combination of a lot of things. I finally got the php updated And the core directory moved. And the site not broken.
Part of it was the $database_connection_charset and the $database_dsn settings. Thank you BobRay and Sottwell. Not sure why those weren't set correctly. But maybe I had overwritten the file with another version of the file with those variables set wrong.
Got it working with 2.3.6 modx and php 5.4.43. When I'm sure it's fixed for good, I'll update to 2.4!