Koozali.org: home of the SME Server

INCLUDE AND PHP

andrea

INCLUDE AND PHP
« on: February 23, 2002, 09:18:23 PM »
how to solve this ?

Warning: open_basedir restriction in effect. File is in wrong directory in /home/e-smith/files/ibays/chat/html/phpChat/chat_bot.php3 on line 15

Daniel B. J.

Re: INCLUDE AND PHP
« Reply #1 on: February 24, 2002, 03:01:25 AM »
Can we se the sourcecode for chat_bot.php
or else i won't be able to help you :-)

Daniel

andrea

Re: INCLUDE AND PHP
« Reply #2 on: February 24, 2002, 05:38:47 AM »
//////////////////////////////////////////////////////////////////////////////
//
// phpChat - Copyright (c) 1999 by Till Gerken - till@phpwebdev.com
//
// This is the code for an IRC bot. It will simply sit there, print all incoming
// traffic to the browser and pass all outgoing messages on to the network.
//
// Tricky implementation of browser timeout prevention.
//
//////////////////////////////////////////////////////////////////////////////

include("configuration.inc.php3");
include("chat_db.php3");
include($chat_phpIRC_path."/phpIRC.inc.php3");
include($chat_phpIRC_path."/phpIRC.php3");

//////////////////////////////////////////////////////////////////////////////

// this variable keeps the timestamp of when traffic was sent to the browser
$chat_last_timeout_prevention = 0;
$chat_shm_current_handle = 0;

//////////////////////////////////////////////////////////////////////////////
//
// chat_print_js(string code) - print javascript code
//
//////////////////////////////////////////////////////////////////////////////
//
// Prints a JavaScript code snippet and embeds it into the correct tags needed
// for the browsers to interprete it
//
//////////////////////////////////////////////////////////////////////////////
//
// Parameteres:
//   $code - string containing the javascript code
//
//////////////////////////////////////////////////////////////////////////////

function chat_print_js($code)
{

    printf("", $code);

}

//////////////////////////////////////////////////////////////////////////////
//
// chat_print_whois(array whois_info) - prints out someone's whois info
//
//////////////////////////////////////////////////////////////////////////////
//
// This function is a helper function of the user command interpreter and
// prints out someone's whois info in a nicely formatted way
//
//////////////////////////////////////////////////////////////////////////////
//
// Parameters:
//   $whois_info - whois info in an array as returned by phpIRC
//
//////////////////////////////////////////////////////////////////////////////

function chat_print_whois($whois_info)
{

    // initialize whois template
    $tpl = new EasyTemplate("templates/whois.inc.html");

    // replace template variables
    $tpl->assign("NICK", $whois_info["nick"]);
    $tpl->assign("IDENT", $whois_info["identd"]);
    $tpl->assign("HOST", $whois_info["host"]);
    $tpl->assign("REALNAME", $whois_info["realname"]);
    $tpl->assign("CHANNELS", $whois_info["channels"]);
    $tpl->assign("SERVER", $whois_info["server"]);
    $tpl->assign("SERVER_INFO", $whois_info["serverinfo"]);                    
    $tpl->assign("IDLE", !empty($whois_info["idle"]) ? $whois_info["idle"]." seconds" : "not idle at all");
    $tpl->assign("AWAY", !empty($whois_info["away"]) ? $whois_info["away"] : "not away");

    // print template
    $tpl->easy_print();

    // scroll down enough to display the whois info
    chat_print_js("window.scrollBy(0, 300);");

}

//////////////////////////////////////////////////////////////////////////////
//
// chat_update_nick_list() - updates the nick list frame
//
//////////////////////////////////////////////////////////////////////////////
//
// Updates the nick list in the database and issues JavaScript code to
// reload the frames related to it
//

bla bla bala
it's very important "include" ..

Jon Blakely

Re: INCLUDE AND PHP
« Reply #3 on: February 24, 2002, 09:43:12 AM »
Andrea

You need to read this faq then implement the work around

http://www.e-smith.org/faq.php3#7q25

Jon

Luke Drumm

Re: INCLUDE AND PHP
« Reply #4 on: February 24, 2002, 11:25:16 PM »
You also may be interested in:

http://www.e-smith.org/bboard//read.php?f=3&i=11473&t=11473

Regards,
Luke