Ad Widget

Collapse

Frontend PHP FATAL error : Zabbix 2.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gatsbylee
    Junior Member
    • Nov 2013
    • 1

    #1

    Frontend PHP FATAL error : Zabbix 2.2

    Hello,

    My env for Zabbix is like this.
    -Zabbix 2.2
    -MySQL 5.5
    -php-fpm
    -Nginx

    I am new.
    After I installed and finished setting up frontend.
    I started seeing this error.

    2013/11/28 23:14:55 [error] 8641#0: *1975 FastCGI sent in stderr: "PHP message: PHP Fatal error: Access to undeclared static property: CProfiler::$instance in /usr/share/zabbix/include/classes/debug/CProfiler.php on line 92" while reading upstream, client: 99.6.41.163, server: monitor.gatsbylee.com, request: "POST /jsrpc.php?output=json-rpc HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "monitor.gatsbylee.com", referrer: "http://monitor.gatsbylee.com/dashboard.php?sid=3933fc6a72bcd390"


    I checked /usr/share/zabbix/include/classes/debug/CProfiler.php
    However, nothing is wrong with it.

    To check what makes this error, I checked all places which calls CProfiler.php and found this.

    I found that the error starts from include/classes/core/ZBase.php, zabbix sets error_handler.
    When zabbix set error_handler, it calls CProfiler::getInstance() which use static variable $instance. After I commented out the line, I stop seeing the error.

    error($errstr.' ['.CProfiler::getInstance()->formatCallStack().']');

    I am guessing that it might be scope issue. ( I am not sure)

    Is there any body who has some idea?
  • screeble
    Member
    • Dec 2011
    • 34

    #2
    Zabbix 2.2.1

    Hello,

    I have similar problem with CProfiler in apache logs:

    Code:
    PHP Fatal error:  Class 'CProfiler' not found in /home/zabbix/xxxxxx/html/include/classes/core/ZBase.php on line 264, referer
    string #264
    Code:
                            // don't show the call to this handler function
                            error($errstr.' ['.CProfiler::getInstance()->formatCallStack().']');
    The file CProfiler.php is present:
    ..../html/include/classes/debug/CProfiler.php

    I didn't find solution of that problem.

    Any ideas will be appreciated.

    Comment

    • misho
      Junior Member
      • May 2014
      • 4

      #3
      Hi,


      If you have enabled PHP Accelerator APC must be disabled for your vhost.
      Tested on PHP 5.4.26 + APC

      Comment

      Working...