I am getting Fatal error: Cannot unset string offsets in /home/www/drupal-6.0/modules/locale/locale.module on line 532 when trying to access my recently upgraded Drupal installation.
I am using version 6.0 and have installed a few modules, but even after removing the custom modules I can't access my site.

Comments

robbt’s picture

Title: Fatal error: Cannot unset string offsets in /modules/locale/locale.module on line 532 » Wiki tools causing callback error. Fatal error: Cannot unset string offsets in /modules/locale/locale.module on line 532
Project: Drupal core » Wikitools
Version: 6.0 » 6.x-1.0-beta1
Component: base system » Code

This went away after refreshing a few times and disabling the modules by renaming the directory they were in.

Now everything is working again.

I did get this error which makes me want to change this to be related to wikitools.

* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wikitools_handle_request' was given in /home/www/drupal-6.0/includes/menu.inc on line 347.
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wikitools_handle_request' was given in /home/www/drupal-6.0/includes/menu.inc on line 347.
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wikitools_handle_request' was given in /home/www/drupal-6.0/includes/menu.inc on line 347.

cwgordon7’s picture

Project: Wikitools » Drupal core
Version: 6.x-1.0-beta1 » 6.0
Component: Code » language system

Ok, no. This is not wikitools' fault. If you did not disable modules properly, this sort of error is exactly the sort of thing you will get. The module's menu entry will still be in the database, but the functions will be gone. If you want to disable module's disable them correctly.

cwgordon7’s picture

Title: Wiki tools causing callback error. Fatal error: Cannot unset string offsets in /modules/locale/locale.module on line 532 » Fatal error: Cannot unset string offsets in /modules/locale/locale.module on line 532
robbt’s picture

Yeah, this makes sense, sorry to put it on Wikitools.

I have been getting "Cannot unset string offsets in bootstrap.ini" errors intermittently with Drupal 6.0. I'm not sure if it is running out of memory and giving this error or what.

I'm running Lighttpd with Php 5.2 and only 256 Megs of RAM on a VPS, so it is possible that the memory is an issue, but usually that would result in a blank page and not a unset string offsets error. I will report more on this if and when I get the error again. It hasn't been easily repeatable but I have gotten it only on my 6.0 Drupal install.

gábor hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)

OK, now you have errors in bootsrap.inc or locale.module?

BTW the locale error above says that locale_update_js_files() somehow makes the $parsed variable a string instead of an array. There was one similar report before, and it turned out to be non-reproducible by the reporter. Can you reproduce? What's your error now?

robbt’s picture

Ok, I'm getting this again when I go to the front page of the site. http://Arawakcity.org
Fatal error: Cannot unset string offsets in /home/www/drupal-6.0/modules/locale/locale.module on line 532

Then when I try to access arawakcity.org/user I get this error
Fatal error: Cannot unset string offsets in /home/www/drupal-6.0/includes/bootstrap.inc on line 488

I'll try refreshing a few times and see what happens. On the next refresh it accessed the user page and the front-page just fine and allowed me to log in.

This is with lighttpd and php-cgi on a server with 256 megs of RAM I don't know if this is in common with the other person reporting this.

This is a weird sporadic error, since the site is letting me on now. There is a good chance that the page is sitting unaccessed for a while in between being used and then starts working after being clicked on and some session getting started, is there anything I can do to try and get more details from a log or something, because it seems to be working now.

robbt’s picture

Ok, so I did this again, tried to access the site and got the same initial error "strings unset offsets in 532" then I decided to poke around and tried to access a node directly via nid, going to http://arawakcity.org/node/5 and I got this new error.

Fatal error: [] operator not supported for strings in /home/www/drupal-6.0/modules/locale/locale.module on line 511

After that I tried accessing even /admin/build and got the same 511 error. Going back to the home page I got 532 again.

This all changes and the site works when I access /user get the boot strap.inc error, this time twice and on the 3rd refresh the site is accessible via all URL's and is no longer producing this error. I'm at DrupalCon right now so I'm not sure when this bug will get reviewed or even what could be causing it.
Here are more details from my status report.

MySQL database 5.0.32
PHP 5.2.0-8+etch7
PHP memory limit 64M
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Update notifications Enabled
Web server lighttpd/1.4.18

I realized I haven't upgraded to 6.1, I'll do that and see if that affects this error.

The only other thing I can thing of is I have my homepage set to wiki which is a redirect from the wikitools module.

I'll upgrade both wikitools and core and see if I'm still getting this bug.

jordanka’s picture

Version: 6.0 » 6.1

I installed drupal 6.1 After that I restore the dump from a database and received the same error Fatal error: Cannot unset string offsets in /modules/locale/locale.module on line 532

after that, I tried to access domain.com/user I get this error
Fatal error: Cannot unset string offsets in /home/www/drupal-6.0/includes/bootstrap.inc on line 488

after couple of refresh the error that I'm getting is:
Fatal error: Cannot use string offset as an array in includes/theme.inc on line 579

Any idea what could it be?

robbt’s picture

Version: 6.1 » 6.2

I just worked on a Drupal 6 Site and came back to it and had this error on the homepage.

Fatal error: Cannot unset string offsets in /home/www/drupal-6.2/modules/locale/locale.module on line 541

I goto sitename/user and got these errors.

Fatal error: Cannot unset string offsets in /home/www/drupal-6.2/includes/bootstrap.inc on line 488

Warning: openlog() expects parameter 3 to be long, string given in /home/www/drupal-6.2/modules/syslog/syslog.module on line 78

I then goto sitename /user again and it works again and the site is up. This is the same behaviour I had before so evidently something is going awry.

robbt’s picture

I'm trying to clear my cache and I'll see if that fixes this issue.

robbt’s picture

I'm actually getting the bootstrap.inc error.
Fatal error: Cannot unset string offsets in /home/www/drupal-6.3/includes/bootstrap.inc on line 493
Pretty continuously after my site locks on the A a a A display.

netbear’s picture

I'll repeat it here, though allready have written it in another topic:
It's like the problem, which was in the imagecache module and thickbox module. There in the table was stored the serialized array but when it is taken out from that table it was forgotten to unserialize it. That's why the letter a appeares. In this case it seems that something is done by cron. And after that watchdog gives the message.

axbom’s picture

Ok but how do you get rid of it? It's driving me crazy!!

netbear’s picture

just found the place in code where was a problem and pasted something like this

if(is_string($my_var)) $my_var = (array)$my_var;

actually don't remember now, sorry

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)