ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

NSM Config Bootstrap

December 09, 2014 1:20pm

Subscribe [1]
  • #1 / Dec 09, 2014 1:20pm

    ThePixelPusher

    82 posts

    Evening,

    I was wondering if anyone has any experience with the NSM Config Bootstrap?  I have some issues, probably elementary ones, but I’m just unsure on certain aspects.

    * Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php
    * Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php

    What would be my realpath? I’m a little unsure about this.

    if(!defined('NSM_ENV')) {
    
        // Set your system folder
        define('NSM_SYSTEM_FOLDER', 'ee-admin');
    
        // Define the server name, basepath and site_url
        // These can all be defined using the server request and filepath
        define('NSM_SERVER_NAME', $_SERVER['SERVER_NAME']);
        define('NSM_BASEPATH', dirname(__FILE__));
        define('NSM_SITE_URL', "//".NSM_SERVER_NAME);

    Do I need to rename NSM stuff?  What do I need to change here?

  • #2 / Dec 10, 2014 3:57am

    ThePixelPusher

    82 posts

    Or maybe this one:

    <?php
    
    /**
     * Environment Declaration
     * 
     * This switch statement sets our environment. The environment is used primarily
     * in our custom config file setup. It is also used, however, in the front-end
     * index.php file and the back-end admin.php file to set the debug mode
     * 
     * @package    Focus Lab Master Config
     * @version    1.1.1
     * @author     Focus Lab, LLC <dev@focuslabllc.com>
     */
    
    if ( ! defined('ENV'))
    {
     switch ($_SERVER['HTTP_HOST']) {
      case 'domain.com' :
       define('ENV', 'prod');
       define('ENV_FULL', 'Production');
       define('ENV_DEBUG', FALSE);
      break;
      
      case 'staging.domain.com' :
       define('ENV', 'stage');
       define('ENV_FULL', 'Staging');
       define('ENV_DEBUG', FALSE);
      break;
      
      case 'dev.domain.com' :
       define('ENV', 'dev');
       define('ENV_FULL', 'Development');
       define('ENV_DEBUG', TRUE);
      break;
    
      default :
       define('ENV', 'local');
       define('ENV_FULL', 'Local');
       define('ENV_DEBUG', TRUE);
      break;
     }
    }
    
    /* End of file config.env.php */
    /* Location: ./config/config.env.php */
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases