Announcement

Collapse
No announcement yet.

PHP Errors

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    PHP Errors

    Hello!

    I just installed latest Zabbix (1.6.5) on a new server and I've got a bunch of PHP errors.
    The web frontend works, but shows these errors everywhere:

    Code:
    # Function ereg_replace() is deprecated[/home/.../include/page_header.php:398]
    # get_class() expects parameter 1 to be object, array given[/home/.../include/classes/ctable.inc.php:138]
    # get_class() expects parameter 1 to be object, array given[/home/.../include/classes/ctable.inc.php:144]
    # get_class() expects parameter 1 to be object, array given[/home/.../include/classes/ctable.inc.php:62]
    # get_class() expects parameter 1 to be object, array given[/home/../include/classes/ctable.inc.php:138]
    I've tried messing with php.ini file (including turning off error output completely), but nothing seems to work :-/

    Anyone got an idea?

    Information about the server:
    PHP runs as cgi-bin, its version 5.3.0 configured with:
    './configure' '--with-mysql' '--enable-bcmath' '--enable-sockets' '--prefix=/home/zabbix' '--with-gd'

    (Note: my only experience with Zabbix so far is a test installation of an older version on another server. On that server I experienced no such troubles)

    #2
    FrontEnd is not ready for PHP > 5.2.9.
    Zabbix | ex GUI developer

    Comment


      #3
      I see.

      I have quite a bit of PHP experience,
      Do you accept patches if i fix those issues, or is someone already working on this?

      thanks for the clarification :-)
      /B

      Comment


        #4
        Yes, we accept patches after reviewing and testing it.
        Zabbix | ex GUI developer

        Comment


          #5
          Hi!

          Using PHP 5.2.x worked a lot better..

          I've fixed some of the issus for 5.3, Ill see if I have time to complete them and send a patch..
          Most challenging parts seems to be converting posix regex to perl syntax..

          cheers

          /B

          Comment


            #6
            Originally posted by Brismtedt View Post
            Hi!

            Using PHP 5.2.x worked a lot better..

            I've fixed some of the issus for 5.3, Ill see if I have time to complete them and send a patch..
            Most challenging parts seems to be converting posix regex to perl syntax..

            cheers

            /B
            I haven't look at them, but this one is the first what comes to my mind
            Zabbix | ex GUI developer

            Comment


              #7
              Any news on the PHP 5.3 compatibility?

              Hi,

              My personal distribution (Arch Linux) has just passed to php 5.3 by default, so I'm getting all kind of deprecated errors, it doesn't seems to be blocking in any ways but it doesn't look nice...

              Do you have any news when the compatibility with 5.3 should be operational, my production servers are running on CentOS with php 5.2 so I'm not in a hurry.

              Also, is there a way to not display the php errors on the web interface?

              Regards,


              Nicolas.

              Comment


                #8
                Originally posted by nickwe View Post
                Hi,

                My personal distribution (Arch Linux) has just passed to php 5.3 by default, so I'm getting all kind of deprecated errors, it doesn't seems to be blocking in any ways but it doesn't look nice...

                Do you have any news when the compatibility with 5.3 should be operational, my production servers are running on CentOS with php 5.2 so I'm not in a hurry.

                Also, is there a way to not display the php errors on the web interface?

                Regards,


                Nicolas.
                Same issue with PHP 5.3. I'll see about going down to 5.2. I'd be happy to not have the php errors on the web interface as well. I suppose I could just look for that logging facility.

                Comment


                  #9
                  Brismtedt, so how did it go with the patch ?
                  Zabbix 3.0 Network Monitoring book
                  Zabbix tips and inspiration (blog)

                  Comment


                    #10
                    PHP5.3 patch

                    Here's a patch that disables PHP logging output to the screen.

                    I looked at the errors, and they all seems to be cosmetic for now. The regular expression interface is being replaced in PHP6. The other common warning doesn't seem to have any effect either. I haven't noticed anything broken in Zabbix yet.

                    Code:
                    --- frontends/php/include/config.inc.php.orig	2009-10-06 02:53:15.000000000 +0000
                    +++ frontends/php/include/config.inc.php	2009-10-06 02:54:28.000000000 +0000
                    @@ -92,7 +92,7 @@
                     
                     	/********** START INITIALIZATION *********/
                     
                    -	set_error_handler('zbx_err_handler');
                    +//	set_error_handler('zbx_err_handler');
                     
                     	global $ZBX_LOCALNODEID, $ZBX_LOCMASTERID, $ZBX_CONFIGURATION_FILE, $DB;
                     	global $ZBX_SERVER, $ZBX_SERVER_PORT;
                    Attached Files

                    Comment


                      #11
                      Thanks, it's working perfectly with the patch :-)

                      Thanks, it's working perfectly with the patch :-)

                      Comment


                        #12
                        for the record, current trunk should be php 5.3 compatible for some time now (in a proper way, simply disabling warnings/errors is a quite awful hack )
                        Zabbix 3.0 Network Monitoring book
                        Zabbix tips and inspiration (blog)

                        Comment


                          #13
                          patch that fixes the get_class() warnings is attached
                          Attached Files

                          Comment

                          Ask questions to Zabbix Dev Team in person at the Zabbix Summit 2018!
                          Working...
                          X