Welcome Guest, Not a member yet? Register   Sign In
Problem with Custom config file
#1

[eluser]Unknown[/eluser]
I'm trying to create a custom config file for active directory but I keep getting the same error no matter what I try. I read the previous topics on here about my problem, but none of the solutions seemed to help me. The error is "Your ad.php file does not appear to contain a valid configuration array."

./system/application/config/ad.php
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| ACTIVE DIRECTORY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your active directory.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
|    ['hostname'] The hostname of your ldap server.
|    ['basedn'] The base domain name for the users
|    ['filter'] The filter to search in active directory
|    ['port'] The port to connect to ldap server
|
| The $active_group variable lets you choose which connection group to
| make active.  By default there is only one group (the "default" group).
*/
include('swe.php');

$active_group = $environment;
$ad = array();

$ad['dev']['hostname'] = "172.29.97.12";
$ad['dev']['basedn'] = "OU=EMPLOYEES, OU=xxxx Users, DC=SE, DC=COM";
$ad['dev']['filter'] = "sAMAccountName=";
$ad['dev']['port'] = "389";

$ad['prod']['hostname'] = "xx.xx.com";
$ad['prod']['basedn'] = "OU=EMPLOYEES, OU=xxxx Users, DC=AD, DC=xxxx, DC=COM";
$ad['prod']['filter'] = "sAMAccountName=";
$ad['prod']['port'] = "389";


/* End of file ad.php */
/* Location: ./system/application/config/ad.php */

autoload.php
Code:
/*
| -------------------------------------------------------------------
|  Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
|    $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files.  Otherwise, leave it blank.
|
*/

$autoload['config'] = array('ad');

swe.php
Code:
<?php
$environment="dev";
?>


Messages In This Thread
Problem with Custom config file - by El Forum - 01-13-2011, 08:42 AM
Problem with Custom config file - by El Forum - 01-13-2011, 09:26 AM
Problem with Custom config file - by El Forum - 01-13-2011, 09:37 AM
Problem with Custom config file - by El Forum - 01-13-2011, 10:55 AM
Problem with Custom config file - by El Forum - 01-13-2011, 04:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB