In all versions of drupal (4.6, 4.7, cvs) sometimes I receive the same error
"warning: array_map(): The first argument, 'utf8_encode', should be either NULL or a valid callback in /home/hombreo1/favt.org/includes/unicode.inc on line 284.
"
Currently I am using yesterday's drupal cvs.

I think need to mention that I'm using Russian language pack and my site www.favt.org contain mostly Russian content.

But:

MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation UTF8_general_ci

PHP compiled with multi byte extension

In unicode.inc on line 284 we see:

// PHP gives us ISO-8859-1 data, we need UTF-8.
$table = array_map('utf8_encode', $table);

Comments

killes@www.drop.org’s picture

very strange, utf8_encode is a native PHP function, it should be always defined.

which php version do you use?

Igor Borovkov’s picture

some data from phpinfo:

PHP Version 4.4.1

Configure Command './configure' '--with-apache=../apache' '--with-mysql=/usr/local' '--without-pear' '--disable-xml' '--without-xmlrpc' '--disable-debug' '--enable-mbstring' '--enable-session' '--without-pdflib' '--without-ming' '--without-ctype' '--with-zlib' '--with-gettext' '--enable-ftp' '--with-gd' '--with-jpeg-dir' '--with-freetype-dir' '--without-cpdflib' '--without-swf' '--with-curl' '--enable-inline-optimization' '--with-gnu-ld' '--enable-memory-limit' '--disable-exif' '--enable-track-vars' '--enable-static' '--disable-overload' '--disable-posix'

beginner’s picture

Do you use Mandriva?

In anycase, you seem to be missing the php4-xml package.
install it and restart the server.

See also:
http://drupal.org/node/28972

beginner’s picture

you have '--disable-xml' in your config command.

beginner’s picture

Status: Active » Fixed

I didn't notice this issue was two months old, already.
I guess that having found the problem, we can close this.

Johnyp’s picture

Version: x.y.z » 4.7.0
Status: Fixed » Active

I'm still seeing this issue in drupal 4.7 official

Running on Gentoo, Apache2, PHP 4 compiled with nls and unicode.

beginner’s picture

Status: Active » Fixed

make sure you have xml support on.
Reopen if you can confirm you have xml support on and you still have the problem.

Johnyp’s picture

Status: Fixed » Active

Yes, i have compiled PHP with xml support enabled and i'm still seeing this problem. Just did a completely fresh isntall of Drupal on Gentoo
PHP version = 4.4.2-pl0-gentoo apache2handler
Webserver = Apache2
Database = mysql 4.1.19-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, ImageMagick, Thumbnail

killes@www.drop.org’s picture

can you post your phpinfo output?

magico’s picture

Category: bug » support
Priority: Minor » Normal

@Johnyp: provide some more info.

l8a’s picture

I am getting the same error from time to time (i think when editing nodes). However it seems all to work as it should.

Mayb somebody could have a view at my phpinfo ( http://web39.itsaserver.org/drupal/test.php ) ?

Sincerally l8a

Zen’s picture

Version: 4.7.0 » 4.7.x-dev
Category: support » bug
Status: Active » Postponed (maintainer needs more info)
Conditi0n’s picture

Version: 4.7.x-dev » 4.7.11
Status: Postponed (maintainer needs more info) » Closed (fixed)

User and topic are inactive.