News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SA Chat

Started by Diego Andrés, July 21, 2010, 10:36:59 PM

Previous topic - Next topic

nend

Quote from: PastorMartin on August 10, 2010, 04:06:06 PM
Quote from: crustybum on August 10, 2010, 02:56:27 PM
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

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;
   }
}


crustybum

Sorry, were do i actually put that?

PastorMartin

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.

nend

Try inserting it towards the top under <?php

crustybum

Yep......that worked..Ta!!!

crustybum

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

nend

Quote from: crustybum 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

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.

PastorMartin

Nend,

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

crustybum

Shame...i just cant get it to work perfect... :-[ :-[ and it also slows the forum down a bit....

Dharshan

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

nend

Quote from: Dharshan on August 13, 2010, 11:35:57 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.

PastorMartin

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.

nend

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.

crustybum

Quote from: redbaby92 on August 04, 2010, 07:28:48 PM
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


nend

Quote from: crustybum on August 14, 2010, 03:06:39 AM
Quote from: redbaby92 on August 04, 2010, 07:28:48 PM
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.

crustybum

Thanks..when will 27 be ready?

nend


Dharshan

Quote from: nend on August 13, 2010, 11:59:05 AM
Quote from: Dharshan on August 13, 2010, 11:35:57 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.

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

nend

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.

PastorMartin

Thank you Nend.  I'll check his system to see if IE is the compatibility is the issue.

Advertisement: