ZABBIX Forums  
  #1  
Old 22-07-2009, 14:20
Brismtedt Brismtedt is offline
Junior Member
 
Join Date: Jul 2009
Posts: 20
Default 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)
Reply With Quote
  #2  
Old 22-07-2009, 16:20
Aly Aly is offline
ZABBIX developer
 
Join Date: May 2007
Posts: 1,124
Default

FrontEnd is not ready for PHP > 5.2.9.
__________________
Zabbix | ex GUI developer
Reply With Quote
  #3  
Old 22-07-2009, 17:12
Brismtedt Brismtedt is offline
Junior Member
 
Join Date: Jul 2009
Posts: 20
Default

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
Reply With Quote
  #4  
Old 22-07-2009, 17:17
Aly Aly is offline
ZABBIX developer
 
Join Date: May 2007
Posts: 1,124
Default

Yes, we accept patches after reviewing and testing it.
__________________
Zabbix | ex GUI developer
Reply With Quote
  #5  
Old 22-07-2009, 20:41
Brismtedt Brismtedt is offline
Junior Member
 
Join Date: Jul 2009
Posts: 20
Default

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
Reply With Quote
  #6  
Old 23-07-2009, 09:17
Aly Aly is offline
ZABBIX developer
 
Join Date: May 2007
Posts: 1,124
Default

Quote:
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
Reply With Quote
  #7  
Old 27-09-2009, 09:24
nickwe nickwe is offline
Junior Member
 
Join Date: Sep 2009
Posts: 8
Default 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.
Reply With Quote
  #8  
Old 06-10-2009, 04:14
Daireishi Daireishi is offline
Junior Member
 
Join Date: Oct 2009
Posts: 2
Default

Quote:
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.
Reply With Quote
  #9  
Old 06-10-2009, 12:22
richlv richlv is offline
Administrator
Zabbix certified trainerZabbix certified professionalZabbix certified specialist
 
Join Date: Oct 2005
Posts: 3,101
Default

Brismtedt, so how did it go with the patch ?
Reply With Quote
  #10  
Old 06-10-2009, 12:44
Daireishi Daireishi is offline
Junior Member
 
Join Date: Oct 2009
Posts: 2
Default 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
File Type: patch disable_logging.patch (426 Bytes, 604 views)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:55.