source: branches/1.1dev/bin/module_maker/_config.inc.php @ 103

Last change on this file since 103 was 80, checked in by scdev, 18 years ago

added Captcha.inc.php and module maker config file

File size: 1.0 KB
Line 
1<?php
2/* module_maker/_config.inc.php
3 * code by strangecode :: www.strangecode.com :: this document contains copyrighted information. */
4
5// Determine common site directory.
6$site_base = realpath($_SERVER['argv'][1] . '/html');
7
8// Test argument.
9if ($_SERVER['argc'] > 1 && '' != $site_base && is_dir($site_base)) {
10    // First arg is path to current site. Realpath removes trailing /s
11    define('SITE_BASE', $site_base);
12} else {
13    die("Error: First argument must be the directory path to an existing site (ex: /home/sc/www.strangecode.com).\n");
14}
15
16// Make sure necessary files exist.
17if (!file_exists(SITE_BASE . '/../config/db_auth.inc.php')) {
18    die("Error: First argument directory must contain the config/db_auth.inc.php file with valid MySQL credentials.\n");
19}
20
21$CFG->enable_session = false;
22$CFG->log_file_priority = false;
23$CFG->log_email_priority = false;
24$CFG->log_sms_priority = false;
25$CFG->log_screen_priority = LOG_DEBUG;
26error_reporting(E_ALL);
27
28require_once dirname(__FILE__) . '/../../config/boot.inc.php';
29
30
31?>
Note: See TracBrowser for help on using the repository browser.