PDA

View Full Version : PhP Help


mholtum
09-27-2003, 3:05 PM
I am running the latest version of InvisionBoards PhP Forum with no problems. I wanted to use a "portal" so I decided to install IPDynamic Lite which came with it.

I edited the files and uploaded them to my server. Then CHMODed them as needed.


I activated IPDynamic Lite in the ACP and when I go to login i get this error message:

Warning: main(./forums/conf_global.php): failed to open stream: No such file or directory in /home/mholtum/public_html/forums/index.php on line 104




Here is a copy of the index.php file


<?php

/*
+--------------------------------------------------------------------------
| Invision Power Board IPB Click Site
| ========================================
| by Matthew Mecham
| © 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > IPB Portal Script
| > Written By Matthew Mecham
| > Date started: 1st July 2003
|
+--------------------------------------------------------------------------
*/

//-----------------------------------------------
// USER CONFIGURABLE ELEMENTS
//-----------------------------------------------

// Define the path to where the forums directory is
// located. This might be "./forums/" for example.
// Don't forget the trailing slash!

define( 'ROOT_PATH', "./forums/" );

// Define the URL to this script. If you're happy to
// use relative URLs - you can leave this blank.
// You can also rename the script here.

$this_script = './forums/index.php';

//-----------------------------------------------
// NO USER EDITABLE SECTIONS BELOW
//-----------------------------------------------

error_reporting (E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);

class Debug {
function startTimer() {
global $starttime;
$mtime = microtime ();
$mtime = explode (' ', $mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
}
function endTimer() {
global $starttime;
$mtime = microtime ();
$mtime = explode (' ', $mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = round (($endtime - $starttime), 5);
return $totaltime;
}
}

class info {

var $member = array();
var $input = array();
var $session_id = "";
var $base_url = "";
var $vars = "";
var $skin_id = "0"; // Skin Dir name
var $skin_rid = ""; // Real skin id (numerical only)
var $lang_id = "en";
var $skin = "";
var $lang = "";
var $server_load = 0;
var $version = "v1.0";
var $lastclick = "";
var $location = "";
var $debug_html = "";
var $perm_id = "";
var $forum_read = array();
var $topic_cache = "";
var $session_type = "";

function info() {
global $sess, $std, $DB, $INFO, $this_script;

$this->vars = &$INFO;

$this->vars['TEAM_ICON_URL'] = $INFO['html_url'] . '/team_icons';
$this->vars['AVATARS_URL'] = $INFO['html_url'] . '/avatars';
$this->vars['EMOTICONS_URL'] = $INFO['html_url'] . '/emoticons';
$this->vars['mime_img'] = $INFO['html_url'] . '/mime_types';
$this->vars['dynamiclite'] = $this_script.'?';
}
}

//--------------------------------
// Import $INFO, now!
//--------------------------------

require ROOT_PATH."conf_global.php"; < ------- LINE 104

//--------------------------------
// The clocks a' tickin'
//--------------------------------

$Debug = new Debug;
$Debug->startTimer();

//--------------------------------
// Require our global functions
//--------------------------------

require ROOT_PATH."sources/functions.php";

$std = new FUNC;
$print = new display();
$sess = new session();

//--------------------------------
// Load the DB driver and such
//--------------------------------

$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver'];

$to_require = ROOT_PATH."sources/Drivers/".$INFO['sql_driver'].".php";
require ($to_require);

$DB = new db_driver;

$DB->obj['sql_database'] = $INFO['sql_database'];
$DB->obj['sql_user'] = $INFO['sql_user'];
$DB->obj['sql_pass'] = $INFO['sql_pass'];
$DB->obj['sql_host'] = $INFO['sql_host'];
$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix'];

$DB->obj['debug'] = ($INFO['sql_debug'] == 1) ? $_GET['debug'] : 0;

// Get a DB connection

$DB->connect();

//--------------------------------
// Wrap it all up in a nice easy to
// transport super class
//--------------------------------

$ibforums = new info();

//--------------------------------
// Set up our vars
//--------------------------------

$ibforums->input = $std->parse_incoming();

//--------------------------------
// The rest
//--------------------------------

$ibforums->member = $sess->authorise();
$ibforums->skin = $std->load_skin();
$ibforums->lastclick = $sess->last_click;
$ibforums->location = $sess->location;
$ibforums->session_id = $sess->session_id;

//--------------------------------
// Set up the session ID stuff
//--------------------------------

if ( $ibforums->session_type == 'cookie' )
{
$ibforums->session_id = "";
$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?';
}
else
{
$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&amp;';
}

$ibforums->js_base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&';

//--------------------------------
// Set up the forum_read cookie
//--------------------------------

$std->hdl_forum_read_cookie();

//--------------------------------
// Set up the skin stuff
//--------------------------------

$ibforums->skin_rid = $ibforums->skin['set_id'];
$ibforums->skin_id = 's'.$ibforums->skin['set_id'];

$ibforums->vars['img_url'] = $ibforums->vars['board_url'].'/style_images/' . $ibforums->skin['img_dir'];

//--------------------------------
// Set up our language choice
//--------------------------------

if ($ibforums->vars['default_language'] == "")
{
$ibforums->vars['default_language'] = 'en';
}

$ibforums->lang_id = $ibforums->member['language'] ? $ibforums->member['language'] : $ibforums->vars['default_language'];

if ( ($ibforums->lang_id != $ibforums->vars['default_language']) and (! is_dir( ROOT_PATH."lang/".$ibforums->lang_id ) ) )
{
$ibforums->lang_id = $ibforums->vars['default_language'];
}

$ibforums->lang = $std->load_words($ibforums->lang, 'lang_global', $ibforums->lang_id);

//--------------------------------
// Require and run
//--------------------------------

require ROOT_PATH."sources/dynamiclite/csite.php";

$run = new click_site();


//+-------------------------------------------------
// GLOBAL ROUTINES
//+-------------------------------------------------

function fatal_error($message="", $help="") {
echo("$message<br><br>$help");
exit;
}

?>




HELP! I am going nuts....

Mntsnow
09-27-2003, 5:19 PM
Sounds like the "path" isnt set correctly...

I'm used to seeing something like

/home/mholtum/www/public_html/forums/index.php

Double check all your path statements

mholtum
09-27-2003, 7:31 PM
I about killed myself trying to figure this one out. Then I finally deleted the entire forum and database and rebooted. Re-Installed the forum and created another DB and user.

Turns out that the index.php file that I uploaded to the "forums" directory, as in fact supposed to be placed in the "Public_html" directory.

As soon as I tried it Walla! It worked. Then I went out to get a beer, returned and refreshed my browser and got an error. Mike could you take a peek and see what you think?

http://www.ravensrealm.net

wingedbuttmonkey
09-27-2003, 7:51 PM
works for me

mholtum
09-27-2003, 10:34 PM
I fixed it! http://www.ravensrealm.net