Advertisement:

Author Topic: SA Chat  (Read 524543 times)

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: 2-SI Chat
« Reply #80 on: August 11, 2010, 12:40:58 AM »
I get this when i send a message

Fatal error: Call to undefined function: array_combine() in /home/content/c/r/u/crusty1/html/forum/Sources/Subs-Db-mysql.php on line 641

any ideas?

I am getting the same error.
PHP5 -- I think that's the version.

array_combine is a PHP function which is part of PHP. This function is not part of SMF or the chat.

This post may give some information - http://www.simplemachines.org/community/index.php?topic=287480.0

More than likely the PHP distro does not have that particular PHP function. 2-SI Chat does not load Subs-Compat.php which has a work around for that PHP function. Instead of loading Subs-Compat.php it looks like a work around in 2-SI Chat is required. Post phoned though until revision 27. A simple work around though would be selecting the code below, which I took from the link above, and putting it in 2-SI Chats index.php

Code: [Select]
if (!function_exists('array_combine'))
{
   function array_combine($keys, $values)
   {
      $ret = array();
      if (($array_error = !is_array($keys) || !is_array($values)) || empty($values) || ($count=count($keys)) != count($values))
      {
         trigger_error('array_combine(): Both parameters should be non-empty arrays with an equal number of elements', E_USER_WARNING);

         if ($array_error)
            return;
         return false;
      }

      // Ensure that both arrays aren't associative arrays.
      $keys = array_values($keys);
      $values = array_values($values);

      for($i=0; $i < $count; $i++)
         $ret[$keys[$i]] = $values[$i];

      return $ret;
   }
}


Offline crustybum

  • Jr. Member
  • **
  • Posts: 368
Re: 2-SI Chat
« Reply #81 on: August 11, 2010, 04:04:22 AM »
Sorry, were do i actually put that?

Offline PastorMartin

  • Semi-Newbie
  • *
  • Posts: 12
Re: 2-SI Chat
« Reply #82 on: August 11, 2010, 04:13:20 PM »
Thank you Nend for your reply but I also do not know where exactly to put that code.  I don't find anything about "array combine" in the file.

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: 2-SI Chat
« Reply #83 on: August 11, 2010, 10:44:57 PM »
Try inserting it towards the top under <?php

Offline crustybum

  • Jr. Member
  • **
  • Posts: 368
Re: 2-SI Chat
« Reply #84 on: August 12, 2010, 02:43:43 AM »
Yep......that worked..Ta!!!

Offline crustybum

  • Jr. Member
  • **
  • Posts: 368
Re: 2-SI Chat
« Reply #85 on: August 12, 2010, 02:40:09 PM »
For some reason it works for some members....and not others?  its not just one membergroup either, some mods can see it....and some cant... :o

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: 2-SI Chat
« Reply #86 on: August 12, 2010, 07:46:08 PM »
For some reason it works for some members....and not others?  its not just one membergroup either, some mods can see it....and some cant... :o

Possible reasons could be cache or script blockers. Have them empty their browser cache and see if that works. If not then it is possible they are using some sort of script or ad blocker that is blocking the JavaScript code. Can you see if you can get their browser setup including add-ons they may have installed with their browser.

Offline PastorMartin

  • Semi-Newbie
  • *
  • Posts: 12
Re: 2-SI Chat
« Reply #87 on: August 12, 2010, 10:23:52 PM »
Nend,

Thank you so much.  That seems to have it fixed on my forum.  Thank you for your quick replies!

Offline crustybum

  • Jr. Member
  • **
  • Posts: 368
Re: 2-SI Chat
« Reply #88 on: August 13, 2010, 08:36:00 AM »
Shame...i just cant get it to work perfect... :-[ :-[ and it also slows the forum down a bit....

Offline Dharshan

  • Full Member
  • ***
  • Posts: 423
  • Gender: Male
  • Free as wind!
    • pcguide
Re: 2-SI Chat
« Reply #89 on: August 13, 2010, 11:35:57 AM »
Nend,

can we have these changes updated on the package files... Plz... :)
R I P  : Steve Jobs | you made the world today look how it is | Thank you

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: 2-SI Chat
« Reply #90 on: August 13, 2010, 11:59:05 AM »
Nend,

can we have these changes updated on the package files... Plz... :)

I'm not sure what you are talking about. Revision 26 was released a couple days ago with requested features.

Offline PastorMartin

  • Semi-Newbie
  • *
  • Posts: 12
Re: 2-SI Chat
« Reply #91 on: August 13, 2010, 10:46:02 PM »
I'm having trouble with some.

If I start the conversation, the other user can use the chat.  When he closes the chat and goes to click on the "Who's Online" it says:

"Error on Page" just below "Who's Online"

It gives this if you double click on the error:
Message: 'document.all.friends.style' is null or not an object
Line: 408
Char: 5
Code: 0
URI: http://cavespringsgbchurch.com/2sichat/index.php?action=body [nofollow]

We've cleared the cookies, temp files, history multiple times.  I'm at a loss with it Nend.

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: 2-SI Chat
« Reply #92 on: August 14, 2010, 12:43:11 AM »
Looks like IE error message again.

Thanks for the more in dept information, I just can't reproduce the error to get any idea of what may be going on with their setup. I'm not saying that there is no problem with the script, may or may not be, I just need to look what is going on with their version of IE. Parts of the script are custom tailored to IE because it does not do scripts the same way as other browser, IE is buggy  ;D. More than likely though it may be IE's compatibility mode set to on.

Offline crustybum

  • Jr. Member
  • **
  • Posts: 368
Re: 2-SI Chat
« Reply #93 on: August 14, 2010, 03:06:39 AM »
when i try to talk to someone this pops up...

Fatal error: Call to undefined function: array_combine() in /homepages/29/d335423707/htdocs/public_html/Sources/Subs-Db-mysql.php on line 641


I uninstalled this mod last night, because it slowed the forum down a bit.......i installed it again this morning, and now i get the same mesage.....same on firefox


Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: 2-SI Chat
« Reply #94 on: August 14, 2010, 11:59:31 AM »
when i try to talk to someone this pops up...

Fatal error: Call to undefined function: array_combine() in /homepages/29/d335423707/htdocs/public_html/Sources/Subs-Db-mysql.php on line 641


I uninstalled this mod last night, because it slowed the forum down a bit.......i installed it again this morning, and now i get the same mesage.....same on firefox

This has been covered. http://www.simplemachines.org/community/index.php?topic=391961.msg2740290#msg2740290 - Your either going to have to apply the manual hack for revision 26 or wait until revision 27.

This url [ http://mods.2-si.net/project,1/ ] will give you more information what is being worked on for revision 27.

Offline crustybum

  • Jr. Member
  • **
  • Posts: 368
Re: 2-SI Chat
« Reply #95 on: August 14, 2010, 12:15:11 PM »
Thanks..when will 27 be ready?

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: 2-SI Chat
« Reply #96 on: August 14, 2010, 12:19:08 PM »
Thanks..when will 27 be ready?

Soon I hope.

Offline Dharshan

  • Full Member
  • ***
  • Posts: 423
  • Gender: Male
  • Free as wind!
    • pcguide
Re: 2-SI Chat
« Reply #97 on: August 14, 2010, 12:42:07 PM »
Nend,

can we have these changes updated on the package files... Plz... :)

I'm not sure what you are talking about. Revision 26 was released a couple days ago with requested features.

thanks. i installed..so far so good. like it!

thank you
R I P  : Steve Jobs | you made the world today look how it is | Thank you

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: 2-SI Chat
« Reply #98 on: August 14, 2010, 01:13:13 PM »
Just dabbed the last feature onto revision 27, next testing, then a release. Should not be too much longer.

Quick recap on what is different on revision 27, so most may or may not want to update. The undefined function error is fixed, this was caused by older versions of PHP. Also introduced is load checking, disables some aspects of the chat or entire thing when server loads are high.

That is it for now, have to investigate some possible IE problems but will not know if these IE errors are a bug or just browser setup problems, like IE compatibility mode. If I find anything that would be revision 28.

Offline PastorMartin

  • Semi-Newbie
  • *
  • Posts: 12
Re: 2-SI Chat
« Reply #99 on: August 14, 2010, 01:19:57 PM »
Thank you Nend.  I'll check his system to see if IE is the compatibility is the issue.