« 试装 MT-Blacklist 2.02a 来抵挡垃圾留言 | 首 页 | 如何在你的 MT 中为你的每个 Category 添加 RSS Feed »

2004 年 12 月 17 日

Troubleshooting for "Warning: Illegal offset type in ..." in PHP

| 分类: 服务器日志 Server Log |

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 don't remember to run:
    #libtool --finish /root/source/apache2/php-4.3.10/libs

    Problem solved!

    (END)

    引用

    引用本文的 URL:
    /cgi-bin/mt/mt-tb.cgi/181.

    发表评论

    (如果您还为在此成功留言,也许是因为需要管理员逐一审核留言内容后放可看到您的评论。请稍后并感谢您的耐心等待。)

    阅览更多文章请访问 首页过去的存档