Author Topic: Chat button not displaying on page  (Read 10948 times)

0 Members and 1 Guest are viewing this topic.

shockwaveenigma

  • Full Member
  • ***
  • Posts: 7
Chat button not displaying on page
« on: July 21, 2014, 12:13:07 PM »
Hi, People.
I have successfully done my installation on my test server.
Two things happens

1. The chat button with image doesnt display on my website after copying and pasting the html generated code, only the button with the plain text displays

2. Clicking on the "Click to Chat" button displays some jibrish i dont understand.

intval($postedid)), $link); } } notify_operators($thread, $firstmessage, $link); mysql_close($link); } $threadid = $thread['threadid']; $token = $thread['ltoken']; $level = get_remote_level($_SERVER['HTTP_USER_AGENT']); $chatstyle = verifyparam( "style", "/^\w+$/", ""); header("Location: $mibewroot/client.php?thread=$threadid&token=$token&level=$level".($chatstyle ? "&style=$chatstyle" : "")); exit; } $token = verifyparam( "token", "/^\d{1,10}$/"); $threadid = verifyparam( "thread", "/^\d{1,10}$/"); $level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); $thread = thread_by_id($threadid); if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { die("wrong thread"); } setup_chatview_for_user($thread, $level); $pparam = verifyparam( "act", "/^(mailthread)$/", "default"); if( $pparam == "mailthread" ) { expand("styles", getchatstyle(), "mail.tpl"); } else if( $level == "ajaxed" ) { expand("styles", getchatstyle(), "chat.tpl"); } else if( $level == "simple" ) { expand("styles", getchatstyle(), "chatsimple.tpl"); } else if( $level == "old" ) { expand("styles", getchatstyle(), "nochat.tpl"); } ?>


Please how can i resolve this?

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: Chat button not displaying on page
« Reply #1 on: July 21, 2014, 02:04:50 PM »
Unfortunately I have no crystal ball in the room.

If you want help you should provide details about the problem:
  1. What version of Mibew do you use, on which OS?
  2. Which browser you've tried to use?
  3. What exactly you do to get the error? How one can reproduce the problem?
 
and so on...

shockwaveenigma

  • Full Member
  • ***
  • Posts: 7
Re: Chat button not displaying on page
« Reply #2 on: July 22, 2014, 06:19:34 PM »
About the challenge i posted earlier let me shed more light on the issue
1st i use mibew 1.6.12 and i ran the installation using Wamp server running on windows 7.
My browser is firefox.
I copied the html code for the image button to my institutional repository, but the button doesnt appear
but when i copied the html code for the text button it appears
on clicking on the button to chat, it brings up the chat window but with errors

intval($postedid)), $link); } } notify_operators($thread, $firstmessage, $link); mysql_close($link); } $threadid = $thread['threadid']; $token = $thread['ltoken']; $level = get_remote_level($_SERVER['HTTP_USER_AGENT']); $chatstyle = verifyparam( "style", "/^\w+$/", ""); header("Location: $mibewroot/client.php?thread=$threadid&token=$token&level=$level".($chatstyle ? "&style=$chatstyle" : "")); exit; } $token = verifyparam( "token", "/^\d{1,10}$/"); $threadid = verifyparam( "thread", "/^\d{1,10}$/"); $level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); $thread = thread_by_id($threadid); if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { die("wrong thread"); } setup_chatview_for_user($thread, $level); $pparam = verifyparam( "act", "/^(mailthread)$/", "default"); if( $pparam == "mailthread" ) { expand("styles", getchatstyle(), "mail.tpl"); } else if( $level == "ajaxed" ) { expand("styles", getchatstyle(), "chat.tpl"); } else if( $level == "simple" ) { expand("styles", getchatstyle(), "chatsimple.tpl"); } else if( $level == "old" ) { expand("styles", getchatstyle(), "nochat.tpl"); } ?>

The above error is what shows up when you click to chat.

I hope this info will help in assisting me resolve this issue.
if more information is needed please let me know i have gone too far with this.

kindly assist

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: Chat button not displaying on page
« Reply #3 on: July 23, 2014, 07:31:53 AM »
It seems that you have a problem with apache. It should not output PHP code to a browser but it does. Is there anything in apache's error log?

Also the files of Mibew may be corrupted. Where did you get Mibew? Did you change any files of it?

shockwaveenigma

  • Full Member
  • ***
  • Posts: 7
Re: Chat button not displaying on page
« Reply #4 on: July 23, 2014, 09:18:04 AM »
Its true that i get apache displaying in my web browser, when i checked the error log
i saw some items like;
1. http internal server error
The server encountered an internal error and was
    unable to complete your request. Either the server is
    overloaded or there was an error in a CGI script.
2. http bad gateway
The proxy server received an invalid
    response from an upstream server.
3. http preconditioned failed.

i downloaded the mibew from a different site other than mibew.org
are you suggesting i reinstall mibew?
the only file changed is the config.php file
thanks for your response

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: Chat button not displaying on page
« Reply #5 on: July 23, 2014, 10:27:35 AM »
I'm sorry, but I cannot support any custom versions of Mibew. Try to ask the same questions in the place where you've got your version.

Or you can try to download and install the official version.

shockwaveenigma

  • Full Member
  • ***
  • Posts: 7
Re: Chat button not displaying on page
« Reply #6 on: July 26, 2014, 04:42:42 PM »
Hi, everyone
in response to your last response, i uninstalled the mibew i previously installed and downloaded mibew from the official website
ran the installation but still ended up with the same error.
You are right when u said that "It seems that you have a problem with apache" the local site where i copied the code for the button to, is Dspace and it uses Apache Tomcat.
The link below is what comes up when you click on the chat button with errors
http://localhost:8080/mibewim/client.php?locale=en&url=http%3A//localhost%3A8080/jspui/&referrer=http%3A//localhost%3A8080/jspui/mydspace

intval($postedid)), $link); } } notify_operators($thread, $firstmessage, $link); mysql_close($link); } $threadid = $thread['threadid']; $token = $thread['ltoken']; $level = get_remote_level($_SERVER['HTTP_USER_AGENT']); $chatstyle = verifyparam( "style", "/^\w+$/", ""); header("Location: $mibewroot/client.php?thread=$threadid&token=$token&level=$level".($chatstyle ? "&style=$chatstyle" : "")); exit; } $token = verifyparam( "token", "/^\d{1,10}$/"); $threadid = verifyparam( "thread", "/^\d{1,10}$/"); $level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); $thread = thread_by_id($threadid); if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { die("wrong thread"); } setup_chatview_for_user($thread, $level); $pparam = verifyparam( "act", "/^(mailthread)$/", "default"); if( $pparam == "mailthread" ) { expand("styles", getchatstyle(), "mail.tpl"); } else if( $level == "ajaxed" ) { expand("styles", getchatstyle(), "chat.tpl"); } else if( $level == "simple" ) { expand("styles", getchatstyle(), "chatsimple.tpl"); } else if( $level == "old" ) { expand("styles", getchatstyle(), "nochat.tpl"); } ?>

If i copy this link and paste it in the address bar without the 8080 it comes up fine.
So i was wondering is it because Dspace and Mibew are running on the same local server or they are having problems with the apache ?

Please kindly assist.
Thank you

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: Chat button not displaying on page
« Reply #7 on: July 28, 2014, 07:54:43 AM »
It seems that your mibew button contains relative URL instead of absolute one. All request to 8080 port are processed by Apache Tomcat which knows nothing about PHP. That is why you see the content of a Mibew script.

Try to tick the "Include host name into the code" checkbox when you generate mibew button code, then replace the button code on the target site.

shockwaveenigma

  • Full Member
  • ***
  • Posts: 7
Re: Chat button not displaying on page
« Reply #8 on: August 03, 2014, 05:56:09 AM »
Hi Dmitriy,
I checked the box when i generated the code for the button. When i copied the code to the target site every thing worked just fine. Thank you so much.