I'm getting the following error when I try to use any of the drush mm functions:

<b>Fatal error</b>: Call to undefined function: array_walk_recursive() in <b>sites/all/modules/drush_mm/drush_mm.inc</b> on line <b>151</b><br />

Comments

clemens.tolboom’s picture

Assigned: Unassigned » clemens.tolboom
Status: Active » Closed (won't fix)

array_walk_recursive is a php 5 function. I have no time (or money) to spend on this :-(

gmak’s picture

Version: 5.x-1.x-dev » 6.x-1.0

I'm getting this error, but I am using PHP5 (5.2.8). So, if it is a php function, I should not be having a problem. Can you give some further information on the nature of what causes this?

thanks

clemens.tolboom’s picture

Version: 6.x-1.0 » 5.x-1.x-dev

Just changing the version of a closed issue won't help you ... you have to reopen this.

And then tell more

qbnflaco’s picture

Status: Closed (won't fix) » Active

I'm also getting this same issue and I'm running PHP5.2.6 on version 6.x-1.1 of the module.

And for me it was line 123 instead.

clemens.tolboom’s picture

Status: Active » Postponed (maintainer needs more info)

Hmmm ... on what commands are these errors happening. I guess all but I need to ask.

And it is on both 5.x and 6.x versions?

As http://php.net/array_walk_recursive gives me no more clues then "PHP 5" I could use some help.

qbnflaco’s picture

It's happening for me with all mm commands. I've only tried it with a drupal 6 installation I have running. All other drush commands seem to work fine.

clemens.tolboom’s picture

What OS are you guys running?

And attach a drush -v mm list output please.

rsvelko’s picture

I have no such problems -
drupal 6.8 and 6.9
Drush 6.x-1.2 6.x-1.2 Up to date
Drush Module Manager 6.x-1.1 6.x-1.1 Up to date

debian 4.0 apache 2 / php 5.2 as apache module

What version of drush are you guys using? The new that is no longer a drupal module? It was a big leap and maybe drush_mm is is lagging behind with something ...

The 1st thing you should give us is whether you are able to get some output from a test.php :


<?php
$sweet = array('a' => 'apple', 'b' => 'banana');
$fruits = array('sweet' => $sweet, 'sour' => 'lemon');

function test_print($item, $key)
{
    echo "$key holds $item\n";
}

array_walk_recursive($fruits, 'test_print');
?>

should give you


a holds apple
b holds banana
sour holds lemon


clemens.tolboom’s picture

Thanks for the example. Hope they will test this.

It is not possible to use drush_mm with the new drush structure ... so the bug must be OS, PHP dependent.

qbnflaco’s picture

I'm running:
Drupal 6.8
Drush 6.x-1.2
Drush Module Manager 6.x-1.1
PHP 5.2.6
Web server Apache/2.2.11 (Unix) PHP/4.4.9 mod_ssl/2.2.11 OpenSSL/0.9.8c mod_fastcgi/2.4.6 DAV/2 SVN/1.4.2

In the browser I get "a holds apple b holds banana sour holds lemon"
Interestingly, if I try to run "php test.php" I get the same undefined function error.

qbnflaco’s picture

Ahah moment today! The issue was a direct call to php on the server by default is php4, I overwrote that in the directories by using php.ini and pointing to php5. And in the alias I created in my bash profile I was pointing to php instead of the php5 binary. Case solved for me! Thanks for all the help! :-)

clemens.tolboom’s picture

Status: Postponed (maintainer needs more info) » Fixed

So check you command line version against the apache version.

gmak’s picture

Could you give a step-by-step explanation of how you fixed this? I think I have the same issue.

rsvelko’s picture

someone above had fixed this after re-checking that he uses php5. He thought he is on php5 while being on php4 instead...

So if you are sure that you use php5 , please give more info on which versions of drupal and drush/drush_mm is this happening.

I use:

drupal 6.8 and 6.9
Drush 6.x-1.2 6.x-1.2 Up to date
Drush Module Manager 6.x-1.1 6.x-1.1 Up to date

debian 4.0 apache 2 / php 5.2 as apache module

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.