Moving a site to new server


Setup hanging on language select

Observed behavior

I have moved sites several times w. no problems, but this time the manager will not run properly - seems it can not find setup info. I get a bunch of ‘spinning wheels’ and nothing to the left.


MODX 2.8.6 on shared server. Several other MODX sites running perfectly on it.

When you open the developer tools in the browser, are there errors in the “Console” tab? In the “Network” tab, what requests fail? What is their response?

Maybe also check the file core/cache/logs/error.log to see if something gets added when you try to run ‘setup’.

Devtools give me same nonfunctioning manager screen.
No log entries.

I have slightly changed the domain name, but that should not be a problem - corrected in setup file

‘Funny’ thing is: the site is running fine

Is there maybe a way to install a fresh copy and the move over ‘stuff’ from the other site?
Would that work?

  • or something in the database I should check?

I did take a look at your site and the behaviour is weird.

Normally when you start the setup with calling setup/ (or setup/index.php?action=language), the first step is to select the language.
A click on “Next” then processes the selection and calls setup/index.php?action=welcome (with the “action” parameter = “welcome”). This request should return another template with the content “Welcome to the MODX installation program. …”.

On your system however, setup/index.php?action=welcome is called correctly after clicking the next “Button”, but somehow the content of the page still shows the language selection template.
I have no idea why. I have never seen this behavior before.

Did you try clearing the cache directory core/cache?
Maybe there is some caching somewhere (outside of MODX) that prevents the site from updating the template?

Thank you for getting back to me.
The cache was cleared before moving site and the ‘cache’ folder deleted as well.
It is indeed very strange.

During setup, the smarty templates for the page are stored in the cache.
In the folder core/cache/setup/smarty, is there a file that ends with .file.welcome.tpl.php?

These are the files in that folder:

Does the file setup/controllers/welcome.php exist?

Do you have any special rules in the .htaccess file in the root folder, that may interfere?
It seems that somehow the request parameter “action” ( ?action=welcome) can’t be read by the code.

Yes, that file is there.
Here is the .htaccess:

# pages via Apache with mod_rewrite to use this functionality, and you must
# change the file name from ht.access to .htaccess.
# Make sure RewriteBase points to the directory where you installed MODX.
# E.g., "/modx" if your installation is in a "modx" subdirectory.
# You may choose to make your URLs non-case-sensitive by adding a NC directive
# to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]

RewriteEngine On
RewriteBase /

# Prevent rewrite the .well-known directory used by LetsEncrypt by rules below of this rule
RewriteRule "^\.well-known/" - [L]

# Prevent dot directories (hidden directories like .git) to be exposed to the public
# Except for the .well-known directory used by LetsEncrypt a.o
RewriteRule "/\.|^\.(?!well-known/)" - [F]

# Rewrite -> -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
#RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# or for the opposite -> use the following
#RewriteCond %{HTTP_HOST} !^$
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteCond %{HTTP_HOST} (.+)$
#RewriteRule ^(.*)$ https://www.%1/$1 [R=301,L] .

# Force rewrite to https for every host
#RewriteCond %{HTTPS} !=on [OR]
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Redirect the manager to a specific domain - don't rename the ht.access file
# in the manager folder to use this this rule
#RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
#RewriteCond %{REQUEST_URI} ^/manager [NC]
#RewriteRule ^(.*)$$1 [R=301,L]

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# For servers that support output compression, you should pick up a bit of
# speed by un-commenting the following lines.

#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74___lsphp .php .php7 .phtml
# php -- END cPanel-generated handler, do not edit`´`

When entering code (or the content of the .htaccess file in this case), please use three backticks at the start and the end, so it doesn’t get formatted as Markdown.

```// a line with 3 backticks at the beginning
// the content of the .htaccess file
```// a line with 3 backticks at the end

When you add the line

echo !empty($this->install->action) ? 'ACTION = ' . $this->install->action : 'ACTION NOT DEFINED';

here in the code

and then request setup/index.php?action=welcome, what gets output on screen (at the top)?

I get

It must be something on the server.
I set up a sub-domain
clean install of ModX
Get the same error.

No, probably not. tried the ‘softaculous way’. It got installed, but the manager does not work.
I tried another CMS, BackdropCMS - works as advertised
My conclusion: There is something in ModX Revo that interferes.

Weird thing: I have several other Mod installs on the same server - different accounts - and they work just fine.

Is this relevant - from cPanel errorlog:

2023-11-26 05:54:01.080776 [INFO] [3906636] [T0] [] Auto Index is disabled for [/home/transportcentral/], access denied                    ```

The “action” parameter is read (from $_REQUEST) and set here in the code:

Why is it empty? That doesn’t make sense.

You could try debugging it further by adding more echo lines like

echo isset ($_REQUEST['action']) ? '$_REQUEST["action"] = ' . $_REQUEST['action'] : '$_REQUEST["action"] NOT SET';

and checking the output.

Thank you Harry, But I am not sure I would bother at this time - if I could even figure it out. The business, Transport Centralen, is to be sold off next month, and we do have working site - just without manager.

New devlopment. I got this now:

Make sure your PHP session configuration is valid and working.

What PHP settings should I look for?

Maybe this helps:

Thank you very much for that. I will try.
What would the standard session.save_path be for 2.8.6 (the )?