• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

PHPBB3 integration (again)

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
25 posts • Page 1 of 2 • 1, 2

Postby maxim » Wed Oct 12, 2011 7:35 pm

I am allmost ashamed to ask.........help help

I read the whole topic and it seems that i am facing familiar problems.

Some of them i could solve doing the error and trial method with help from all the stuff posted here.

What i want is that my forumusers can use this great chat facility.
After one is logged in on the forum, there's no need to log on again for using the chat functionality.
Thats what i am aiming, anyway.

I minimized the code as far as i could.
Unfortenately i am stuck at the moment.

After i logged myself in, the next screen is the message "chat loading...please wait" and thats all there is. :-(

If someone could lend a hand ...and give the golden tip it would be delightfull :-)


Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
$params = array();
require_once dirname(__FILE__) . "/src/phpfreechat.class.php";
$user->session_begin();
$auth->acl($user->data);
$user->setup();
get_username_string ;
$oog = $user->data [username];
if ($oog == "Anonymous")
    {
     header("Location: http://" . $_SERVER[SERVER_NAME] ."/Foruma/ucp.php?mode=login&redirect=/Foruma/chat/");
    }
$params["debug"] = true;
$params["isadmin"] = false;
$params["title"] = "Quick chat";
$params["nick"] = $user->data['username_clean'];
$params["serverid"] = md5(__FILE__); // used to identify the chat
$chat = new phpFreeChat($params);

  ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
    <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <title>phpFreeChat demo</title>
    </head>
    <body>
      <?php $chat->printChat(); ?>
    </body>
  </html>
Last edited by maxim on Fri Oct 14, 2011 7:52 pm, edited 1 time in total.
maxim
Member
 
Posts: 13
Joined: Wed Oct 12, 2011 7:13 pm
Top

Postby OldWolf » Thu Oct 13, 2011 9:48 am

See if this page helps at all:
http://www.phpfreechat.net/parameter_errors
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby maxim » Fri Oct 14, 2011 8:00 pm

Check $params["server_script_url"]

I searched in the Global parameter list and the remark:

server_script_url

This url indicates the server_script_path. It will be used to do AJAX requests from the browser. Therefore, this URL should be a browsable public url. This parameter is useful when using URL rewriting because basic auto-calculation will fail. (Default value: '' - means this parameter is automatically calculated)

didnt bring me further i am afraid. I do not know where the script_path is supposed to be. Unfotunately i am a no-no :-)
maxim
Member
 
Posts: 13
Joined: Wed Oct 12, 2011 7:13 pm
Top

Postby OldWolf » Sat Oct 15, 2011 12:23 am

I would suggest putting it into debug mode so you can see the variable dump, and see what it's currently setting it to... chances are something will be obviously wrong.

Before doing that though, I didn't think to tell you to first try manually rehashing. (http://www.phpfreechat.net/rehash)
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby maxim » Sat Oct 15, 2011 9:55 am

Oldwolf,

Wat i did is:

delete the code below

Code: Select all
get_username_string ;
$oog = $user->data [username];
if ($oog == "Anonymous")
    {
     header("Location: http://" . $_SERVER[SERVER_NAME] ."/Foruma/ucp.php?mode=login&redirect=/Foruma/chat/");
    }

The chat started after i did that. I did a /rehash

Put the code back in, but then the screen with the "chat loading...please wait" appears, and thats all.
I cant do a rehash after i put the code in because it stops all at the "chat loading .. " exposure.

Since it works fine without usercode, i think it lost its way after the login is executed. But still cant figure out why.
maxim
Member
 
Posts: 13
Joined: Wed Oct 12, 2011 7:13 pm
Top

Postby OldWolf » Sat Oct 15, 2011 7:28 pm

maxim wrote:I cant do a rehash after i put the code in because it stops all at the "chat loading .. " exposure.

That's why I said "manual" rehash. Read the page I linked you to.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby maxim » Sun Oct 16, 2011 11:33 am

Sorry, i read it half.
I did the manual thing as well now, deleted both directories .

closed the browser (Firefox 7), waited 10 mins.
Started to browse to the chat but the results remain the same.

Are there more things that i can do OldWolf?
Last edited by maxim on Sun Oct 16, 2011 11:34 am, edited 1 time in total.
maxim
Member
 
Posts: 13
Joined: Wed Oct 12, 2011 7:13 pm
Top

Postby re*s.t.a.r.s.*2 » Sun Oct 16, 2011 8:09 pm

Hi,

Sorry to interrupt ,

There is some errors I believe in the script

. get_username_string , is a function is missing the parenthesis so it should be
Code: Select all
get_username_string()

.
. $oog = $user->data [username]; , must be a string in the array should be
Code: Select all
$oog = $user->data ['username'];

. same for $_SERVER[SERVER_NAME] , it must be between quotes
Code: Select all
$_SERVER['SERVER_NAME']

Try the new script see if works, if not please give a public URL for your chat room..
regards.
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
$params = array();
require_once dirname(__FILE__) . "/src/phpfreechat.class.php";
$user->session_begin();
$auth->acl($user->data);
$user->setup();
get_username_string() ;
$oog = $user->data ['username'];
if ($oog == "Anonymous")
    {
     header("Location: http://" . $_SERVER['SERVER_NAME'] ."/Foruma/ucp.php?mode=login&redirect=/Foruma/chat/");
    }
$params["debug"] = true;
$params["isadmin"] = false;
$params["title"] = "Quick chat";
$params["nick"] = $user->data['username_clean'];
$params["serverid"] = md5(__FILE__); // used to identify the chat
$chat = new phpFreeChat($params);

  ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
    <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <title>phpFreeChat demo</title>
    </head>
    <body>
      <?php $chat->printChat(); ?>
    </body>
  </html>
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby OldWolf » Sun Oct 16, 2011 9:32 pm

Aaaand, don't forget to rehash (manually) after you upload the changes.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby maxim » Mon Oct 17, 2011 8:02 pm

First of all i would like to say that i appreciatie the help you guys give me.

What i did:

Installed the script as mentioned above.
I did a manual rehash after i uploaded the script into the dir.

started the browser end navigated to de chat dir.
so far so good.

Then this showed up:

[phpBB Debug] PHP Warning: in file /includes/functions_content.php on line 1178: Missing argument 1 for get_username_string(), called in /chat/index.php on line 11 and defined
[phpBB Debug] PHP Warning: in file /includes/functions_content.php on line 1178: Missing argument 2 for get_username_string(), called in /chat/index.php on line 11 and defined
[phpBB Debug] PHP Warning: in file /includes/functions_content.php on line 1178: Missing argument 3 for get_username_string(), called in /chat/index.php on line 11 and defined
[phpBB Debug] PHP Warning: in file /chat/index.php on line 15: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /chat/src/pfcuserconfig.class.php on line 24: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /chat/src/pfcuserconfig.class.php on line 24: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /includes/functions.php:3765)

Beats me !

So, following the advise here's my chat room.
Its a test environment on my own server.
if requested for a login pls use "phpfree" for UC and PW.
Eventually also te be used with ftp.
84.86.117.3/Foruma/chat/

I left the chat environment in a state after i did a manual rehash again

Thrilling !!!!
Last edited by maxim on Mon Oct 17, 2011 8:05 pm, edited 1 time in total.
maxim
Member
 
Posts: 13
Joined: Wed Oct 12, 2011 7:13 pm
Top

Postby re*s.t.a.r.s.*2 » Mon Oct 17, 2011 9:19 pm

Hi,

You dont need that function at all, I left it there because i thought you wanted to do something with it,
just comment it out like this //get_username_string() ;

then load the chat and rehash as admin..

regards..
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby maxim » Tue Oct 18, 2011 9:29 am

Hi,

commented it out and manually rehashed.

It shows me the loginscreen of the Forum and, after logging in, stops again with the message "chat loading...please wait".

hm..
maxim
Member
 
Posts: 13
Joined: Wed Oct 12, 2011 7:13 pm
Top

Postby re*s.t.a.r.s.*2 » Tue Oct 18, 2011 2:38 pm

Hi,

put the code again and make an account so I can access your chat please...

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby maxim » Tue Oct 18, 2011 4:56 pm

HI,

if i put in the code again 'get_username_string();' it will respond with the errors . I left it for now commented out!!

here's my chat room.
Its a test environment on my own server.

if requested for a login pls use "phpfree" for UC and PW.

Eventually also to be used with ftp. (so you can change the index.php if you want)
84.86.117.3/Foruma/chat/

I left the chat environment in a state after i did a manual rehash again.

Loads of luck re*s.t.a.r.*2
maxim
Member
 
Posts: 13
Joined: Wed Oct 12, 2011 7:13 pm
Top

Postby re*s.t.a.r.s.*2 » Tue Oct 18, 2011 5:12 pm

Hi,

Can you post your apache error logs or server logs, and then please inform if you have given correct rights to the "/data" folder in your chat, the correct right are 777 to the folder and all subfolders and files..

please do this in order to help you more.

and post your code in here please..

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Next

Post a reply
25 posts • Page 1 of 2 • 1, 2

Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)

Who is online

Users browsing this forum: No registered users and 1 guest

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub