Just move the contents of core/ where you want it, then simply edit the MODX_CORE_PATH define in setup/includes/core.config.php and run setup.
What are the steps to install the core in a different place on a new install?
Just move the contents of core/ where you want it, then edit the MODX_CORE_PATH define in setup/includes/core.config.php and run setup in upgrade mode, OR, edit it in each of the following files manually:
What are the steps to move the core on an existing install?
This is a little different, and generally, I only deploy the core itself via SVN when deploying on a remote site from SVN, IOW, in the directory where I want my core to be located I simply execute
If using SVN, how does having a moved core affect updating (especially, how do you keep SVN from replacing the "missing" core directory)?
Are there any extra steps necessary for future builds and setups?
svn co http://svn.modxcms.com/svn/tattoo/tattoo/branches/revolution/core .
There are no logs (or log dir.) under the cache dir.
Any errors in cache/logs/error.log? (or cache/MODX_CONFIG_KEY/logs/error.log if your MODX_CONFIG_KEY != ’config’)
if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR);
include dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR.'config.core.php';
Absolutely not; you’ll need to either create and maintain your own config.core.php file that defines this, or go through the gateway as I suggest. IOW, no php files should be directly accessed from the browser other than index.php or manager/index.php.
if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR);
Again, this should be being served by an existing gateway, not captcha.php.
Actually, I think the original line can be removed since captcha.php is always accessed as an img URL and MODX_CORE_PATH would never be defined at that point.
Ultimately the problem is going to be locating a config.core.php file to include if they are located in various places (depending on a how you configure your paths), and I’m hoping that’s motivation to deter creating components that contain their own gateways with directly accessible php files.
Yes, but what’s not safe is to claim to know where it is relative to the assets_path setting. So yes, you could include MODX_BASE_PATH . config.core.php, but you don’t know what MODX_BASE_PATH is until it’s included.
Quote from: OpenGeek at Mar 18, 2009, 12:51 AM
Ultimately the problem is going to be locating a config.core.php file to include if they are located in various places (depending on a how you configure your paths), and I’m hoping that’s motivation to deter creating components that contain their own gateways with directly accessible php files.
I didn’t exactly create a component that contains its own gateway. I adapted an existing component that already had one (and I did it with a ton of consultation as you’ll recall). I put many, many hours into developing the current captcha plugin and it won’t be easy to find the motivation to start over.
When you say "absolutely not," I can’t tell what you’re referring to and whether you’re agreeing with me or telling me my approach is a huge mistake.
All captcha.php does is produce the image and write a corresponding $_SESSION variable (and it’s been around in MODx for a long, long time) so I don’t think it’s a huge security vulnerability, although I understand the general policy of not having the browser access .php files directly. In use, it’s always accessed as the src in an <img> tag. Accessing it directly will give the user a look at a captcha image.
Isn’t it fairly safe to assume that there will be a config.core.php in the site root?