[support] Partially broken site after PHP upgrade

Larry Garfield larry at garfieldtech.com
Wed Mar 26 00:31:00 UTC 2008


On Tuesday 25 March 2008, Albert Cuesta wrote:
> Hi
>
> Our hosting provider upgraded PHP4 to PHP5, and now some parts of our
> Drupal 5.x site have stopped working.
>
> This is what we are getting when trying to access many pages:
>
> Fatal error: Cannot use string offset as an array in
> /home/MYSITE/public_html/sites/all/themes/MYSITE/template.php on line
> 51
>
> Any suggestions for fixing this?
>
> Thank you!

There are several array handling functions that are supposed to take an array 
and an array.  In PHP 4, you could be lazy and pass a string as the second 
parameter and PHP would silently convert it to a one-element array for you.  
PHP 5 requires you to pass a for-reals array as the second parameter.  It 
sounds like that is what you're running into.

Check to see what's on line 51, and see the PHP manual for any functions youre 
using.  If that's not it, then as others have said "show us the code!" :-)

-- 
Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


More information about the support mailing list