PHP after upgrading to 4.3.10 displays errors: "Warning: Illegal offset type in…"

I found this solution originally on Kreny’s Blog

Troubleshooting for “Warning: Illegal offset type in …” in PHP

Posted by kreny at December 17, 2004 02:08 AM

System Environment:
Red Hat 9.0 + Apache 2.0.52 + PHP 4.3.10 + Zend Optimizer v2.1.0 etc.

  • Description:I upgraded PHP 4.3.9 to 4.3.10 and when I opened my sites like phpMyAdmin or Nucleus v2.5 beta, the page led to:

    Warning: Illegal offset type in abc.php on line 91
    Warning: Illegal offset type in abc.php on line 108

    After I downgraded PHP to 4.3.9, everything goes well.

  • Troubleshooting:I searched PHP Bugs and found some interesting issues:
  • Bug #31116 Pear not working after update to 4.3.10
  • Bug #30914 foreach returns the wrong value
  • So I was wondering that the low-version of Zend Optimizer caused the problem.

    Upgrading Zend Optimizer to 2.5.7
    Please read the Zend Optimizer User Guide first.

    # tar -zxvf ZendOptimizer-2\[1\].5.7-linux-glibc21-i386.tar.gz
    # cd ZendOptimizer-2.5.7-linux-glibc21-i386
    # ./install

    The following configuration changes have been made:

    - The php.ini file has been relocated from /usr/local/lib to /usr/local/Zend/etc.
    - A symbolic link for the php.ini file has been created in /usr/local/lib.
    - The original php.ini was backed up to /usr/local/lib/php.ini-zend_optimizer.bak

    Some lines updated in php.ini:

    [Zend]
    zend_optimizer.optimization_level=15
    zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-2.5.7
    zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-2.5.7
    zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

    Then restart the apache and recombine the PHP 4.3.10 by using configure in my previous setting, and remember to run:
    #libtool –finish /root/source/apache2/php-4.3.10/libs

This entry was posted in Linux and tagged . Bookmark the permalink.

NewPush has solutions to fit your business needs.  For more than a decade, our focus has been to take on the technical challenges that are the hardest and most time-consumming.  Our goal is to free up your resources to focus on the core activities of your business and to drive your business performance.  Please visit our main site at newpush.com for more information or call us at +1-303-423-4500.