PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



Newbie problem - probably wrong path variables

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> PHP General
View previous topic :: View next topic  
Author Message
MarkHoward



Joined: 23 Nov 2009
Posts: 2
Location: New Zealand

PostPosted: Mon Nov 23, 2009 3:10 am    Post subject: Newbie problem - probably wrong path variables Reply with quote

I am trying to display the number of people in the (phpfreechat) chat room on another webpage.
Chat page: www.nzmotorhome.co.nz/NZMotorhomeChat/chat.php.
Other page: www.nzmotorhome.co.nz/directory/directory.php.
In chat.php I have
Code:
//next 7 lines of code from phpBB "Sessions Integration"
    define('IN_PHPBB', true);
    $phpbb_root_path = '../NZMotorhomeForum/';
//    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();
.
.
.
.
$params["serverid"] = md5("ForumChat"); // calculate a unique id for this chat

In directory.php I have
Code:
        <?php
            require_once dirname(__FILE__)."/chat/src/pfcinfo.class.php";
            $info  = new pfcInfo( md5("ForumChat") );
            // NULL is used to get all the connected users, but you can specify
            // a channel name to get only the connected user on a specific channel
            $users = $info->getOnlineNick(NULL);
            echo '<div align="center">';
            $info = "";
            $nb_users = count($users);
            if ($nb_users <= 0)
              $info = "<center>%d users in the Chat Room</center>";
            echo "</div>";
            echo "<div>";
            echo "<p>".sprintf($info, $nb_users)."</p>";
            echo "<ol>";
            foreach($users as $u)
            {
              echo "<li>".$u."</li>";
            }
            echo "</ol>";
            echo "</div>";
           ?>

When I log in on chat.php and then open directory.php (note: the directory link on the chat page opens directory.html, not directroy.php), I get the following error

Quote:
Warning: require_once(/home/nzmotorh/public_html/directory/chat/src/pfcinfo.class.php)
[function.require-once]: failed to open stream: No such file or directory in /home/nzmotorh/public_html/directory/directory.php on line 76

Fatal error: require_once() [function.require]: Failed opening required '/home/nzmotorh/public_html/directory/chat/src/pfcinfo.class.php'
(include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nzmotorh/public_html/directory/directory.php on line 76


I've been trying to get this sorted. on and off, for weeks now. I feel it must be something really simple about defining paths that I don't understand.

Please can someone help me, or tell me what other information I need to provide.
This is just a test and eventually, when I get it going, I want to implement it in a phpBB3 overall-footer.php file.
Back to top
View user's profile Send private message
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



Post new topic   Reply to topic    WeberForums.com Forum Index -> PHP General All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum