Have done many times before, but now it doesn’t work. Moving a MODX website from one CPanel account to another, both set to the same 8.1PHP configuration. First a new blank MODX 3.1 installation, then import the previous data for the database and copy all the files. Normally works fine.
The difference this time is that previously the site used a domain name that was an addon for the CPanel account, not the main domain name, so it used a filepath different from the public_html root. In the new CPanel account, it is the main domain name and is using the normal public_html root.
Now, the manager area works fine, but the front end triggers a 503 error with the message: Site temporarily unavailable; missing dependencies. And I cannot run setup for a second time. I bought a new copy of Bob’s life-saving sitecheck, but it also triggers a big pink error and stops prematurely.
The MODX error log:
PHP Fatal error: Uncaught Error: Failed opening required ‘/home/chalkstream/millstreambarndotcom/core/vendor/autoload.php’ (include_path=‘.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php’) in /home/chalkstream/public_html/index.php:29
Stack trace:
#0 {main}
thrown in /home/chalkstream/public_html/index.php on line 29
This filepath is wrong: /home/chalkstream/millstreambarndotcom/core/vendor/autoload.php
That was the right filepath for the old installation. The new filepath is: /home/chalkstream/public_html/core/vendor/autoload.php
The problem seems to come from a cached value for modx_core_path on line 29 of the index file for the front end of the site. I have emptied the core/cache folder numerous times, And emptied the browser’s cache.
If the core_path value is the problem, where is it being stored? I don’t see it on the config.inc or config.core files or in the system and server settings in the MODX manager?