Moving a site to new server

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 https://transport-centralen.dk

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:
a08a051f80af6561e287835d9f4ad2bb2b11d12d_0.file.language.tpl.php
abe4690053f28f648ca7ead19e5a1082364695a5_0.file.footer.tpl.php
c1587b2758618354cb4545d055540a4ab232eef1_0.file.header.tpl.php

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 www.example.com -> example.com -- 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 example.com -> www.example.com use the following
# DO NOT USE BOTH
#
#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 ^(.*)$ https://example.com/$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
</IfModule>
# 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
ACTION NOT DEFINED

It must be something on the server.
I set up a sub-domain https://mx.transport-centralen.dk/
clean install of ModX
Get the same error.

UPDATE:
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] [85.203.137.110:39606:HTTP2-15#APVH_mx.transport-centralen.dk:443] Auto Index is disabled for [/home/transportcentral/mx.transport-centralen.dk/], 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 )?

Did not make any difference.
save_path was set to public_html/

I have now tried to install the latest v. 3 of ModX in a new sub-domain. https://m3.transport-centralen.dk
Same thing: It hangs on the language selector.

I see no difference in the setup for this account and there is no errors anywhere.
php is 8.1