Skip to content

How to rename the EVO manager folder in EVO2? #1750

Closed

Description

@q2apro

After the update from EVO1 to EVO2 I wanted to rename the manager folder (like in EVO1) to have more security, so I:

  • edited file /assets/cache/siteManager.php and added this line:
<?php
define('MGR_DIR', 'managerhidden');
  • then I renamed the folder manager to managerhidden
  • but now when I navigate to /managerhidden it throws an error that other files in manager cannot be found

PHP Fatal error: require_once(): Failed opening required '/manager/includes/protect.inc.php' (include_path='.:/opt/sp/php7.4/lib/php') in /index.php on line 69

So the question is: How to rename the EVO manager folder in EVO2?

Activity

  1. Dmi3yy commented on Jan 7, 2021

    @Dmi3yy

    file: /core/custom/define.php

    define('MGR_DIR', 'manager2’);

    and

    file: config.php in root folder

    return [
    'manager' => DIR . '/manager2',
    ];

  2. q2apro commented on Jan 7, 2021

    @q2apro
    Author

    What path has the "root folder"?

    Maybe you mean file config.inc.php in \manager\includes\?

  3. Dmi3yy commented on Jan 7, 2021

    @Dmi3yy

    Near with index.php

  4. q2apro commented on Jan 8, 2021

    @q2apro
    Author

    I created a file config.php in the root (next to the main index.php). Content:

    <?php
    
    return [
    	'manager' => DIR.'/manager2',
    ];
    

    When opening the website now, it throws an error:

    Warning: Use of undefined constant DIR - assumed 'DIR' (this will throw an Error in a future version of PHP) in /config.php on line 4

    And the website does not work anymore.

    Can you please tell the right path of the config.php file? Thanks.

  5. Dmi3yy commented on Jan 8, 2021

    @Dmi3yy

    Bad copypast

    файле /core/custom/define.php

    define('MGR_DIR', 'manager2’);
    и
    config.php в root
    return [ 'manager' => __DIR__ . '/manager2', ];

  6. q2apro commented on Jan 9, 2021

    @q2apro
    Author
    1. Created a file /core/custom/define.php
    2. Created a file /config.php
    3. Uploaded both files to the server
    4. Renamed manager to manager2

    When opening \manager2 I get the error message:

    Unable to load configuration settings
    Please run the Evolution CMS install utility

    It is not working.

  7. Dmi3yy commented on Jan 11, 2021

    @Dmi3yy

    In core config need use 3 params: like in sample

    https://github.com/evolution-cms/evolution/blob/3.x/config.php.example

    and all will work

    tested

  8. locked and limited conversation to collaborators on Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions