Repository navigation
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.phpand added this line:
<?php
define('MGR_DIR', 'managerhidden');
- then I renamed the folder
managertomanagerhidden - but now when I navigate to
/managerhiddenit throws an error that other files inmanagercannot 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?
All reactions
Replies: 7 comments
file: /core/custom/define.php
define('MGR_DIR', 'manager2’);
and
file: config.php in root folder
return [
'manager' => DIR . '/manager2',
];
All reactions
What path has the "root folder"?
Maybe you mean file config.inc.php in \manager\includes\?
All reactions
Near with index.php
All reactions
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.
All reactions
Bad copypast
файле /core/custom/define.php
define('MGR_DIR', 'manager2’);
и
config.php в root
return [ 'manager' => __DIR__ . '/manager2', ];
All reactions
- Created a file
/core/custom/define.php - Created a file
/config.php - Uploaded both files to the server
- 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.
All reactions
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