Recent Topics

1 Jan 30, 2012 15:26    

My b2evolution Version: 4.1.x

Hello,
I updated b2evo from version 2009 to newest, deleted all old files except media and _basic_config.php and all seems to work but after installation I got:
Fatal error: Call to undefined function: array_combine() in /homepages/13/d11748650/htdocs/mweu/members/inc/locales/_locale.funcs.php on line 663

The adress seems to be wrong, members is a subdirectory of my domain but I'm not shure what to change and where...

thx for help!

micha
p.s. The lines 662 till 667 in this script are:

// Create "locale" => "prio" list
$accept_list = array_combine($accept_list[1], $accept_list[2]);
$maxq = count($accept_list)+1;
foreach( $accept_list as $k => $v )
{
if( $v === '' )
p.s.s. Seems to be a bit tricky. Maybe someone knows what happened in the installscript about 1 second after "Install succesful" shows up.
thx

2 Feb 01, 2012 18:08

are you using PHP verson 5.0 or higher?

if not then you need a substitute function (place following code at bottom of file):


if (!function_exists('array_combine')) {
   function array_combine($arr1, $arr2) {
      $out = array();
      $arr1 = array_values($arr1);
      $arr2 = array_values($arr2);
      foreach($arr1 as $key1 => $value1) {
         $out[(string)$value1] = $arr2[$key1];
      }
      return $out;
   }
}

3 Feb 04, 2012 15:22

thx kenton for your help!

I tried it in _misc.funcs.php but nothing changed.

Yes its php v.4.49, a 1&1 account.

cheers

micha

4 Feb 04, 2012 16:11

micha69 wrote:

thx kenton for your help!

I tried it in _misc.funcs.php but nothing changed.

Yes its php v.4.49, a 1&1 account.

cheers

micha

That function only was introduced in PHP 5. The code should run and probably /hopefully will not generate an error. You only saw an error first time as the function wasn't there to call from within PHP.

5 Feb 04, 2012 18:48

Hello Kenton,

it was my fault, didn't check that I had to overwrite the last line w/out putting the */ at the end.

Now it works - thx a lot my friend! :D :D :D :D


Form is loading...