Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zabbix 3.0 vs php version #429

Closed
nicohouillon opened this issue Jul 10, 2017 · 5 comments
Closed

zabbix 3.0 vs php version #429

nicohouillon opened this issue Jul 10, 2017 · 5 comments

Comments

@nicohouillon
Copy link

nicohouillon commented Jul 10, 2017

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10
  • Ruby:2.3
  • Distribution: redhat amazon
  • Module version: 4.1.3

How to reproduce (e.g Puppet code you use)

puppet reload MYVM--provision

class { 'apache':
    mpm_module => 'prefork',
  }
  include apache::mod::php

  class { 'mysql::server':
    }

  class { 'zabbix':
    zabbix_version => '3.0', 
    zabbix_url    => 'zabbix.nh.local',
    database_type => 'mysql',
    apache_listen_ip => '0.0.0.0',
    apache_listenport => 8082,
    #database_schema => 'usr/share/doc/zabbix-server-mysql*',
    #database_schema_path => 'usr/share/doc/zabbix-server-mysql*',
    zabbix_timezone => 'America/Vancouver',
 
}

What are you seeing

blank page when launching zabbix home page

What behaviour did you expect instead

zabbix landing page

Output log

http error log :
PHP Parse error: syntax error, unexpected '[' in /usr/share/zabbix/index.php on line 29

phpinfo(): PHP Version 5.3.29

Any additional information you'd like to impart

seems like php version provided in the module is too old for tuning with zabbix set to 3.0

zabbix 3.0 requirement :
PHP | 5.4.0 or later | PHP v7 is not supported yet.

@nicohouillon
Copy link
Author

nicohouillon commented Jul 11, 2017

it seems due to AMI box which try to install 5.3.29 by default

yum install php
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.29-1.8.amzn1 will be installed  

@nicohouillon
Copy link
Author

dependencies nightmare continues...
ended up with a different box , Ubuntu 16.04 xenial.
but then php 7 is he only one available on this distro and zabbix is php7 compatible after 3.2 .

So I tried :
zabbix_version=> '3.2'

but zabbix_server -V returns : 3.0.9

any trick to force a specific version of zabbix server ?

@bastelfreak
Copy link
Member

For your AMI issue: The operatingsystem is heavily outdated and ships a legacy php version. The scope of this module is not the manage php. I guess this is centos6 based. There are third party repos available that provide you newer php versions


Can you provide the code you used to get zabbix 3.2 on ubuntu? We have an acceptance test that works on ubuntu 16.04 + zabbix3.2, so I guess you're missing a parameter here or provide the wrong value to one of them.

@nicohouillon
Copy link
Author

I just comment zabbix_version as it is 3.2 by default.( see below code).
I also tried to specify zabbix_version to 3.2 .
I also tried to specify repo_location to the specific ubuntu branch 'http://repo.zabbix.com/zabbix/3.2/ubuntu ' but it can not work as it already declared in ::params: class.

`class { 'apache':
mpm_module => 'prefork',
}
include apache::mod::php

class { 'mysql::server':
}

class { 'zabbix':
#zabbix_version => '3.0',
zabbix_url => 'zabbix.nh.local',
database_type => 'mysql',
apache_listen_ip => '0.0.0.0',
apache_listenport => 8082,
#database_schema => 'usr/share/doc/zabbix-server-mysql*',
#database_schema_path => 'usr/share/doc/zabbix-server-mysql*',
zabbix_timezone => 'America/Vancouver',

}`

In puppet debug I can see lines with Inst and ohters with Conf
Inst lines refered to 3.2 but Conf lines refer to 3.0.9 , maybe a lead ?

@nicohouillon
Copy link
Author

nicohouillon commented Jul 13, 2017

Finally here is the final setup and last report errors + fix :

  • Vagrant 1.9.4 (in order to fix ioctl messages in running shell provisioning), but lower than 1.9.6 as it introduced HOST IP NFS helper error
  • puppet 4.10 (to support zabbix modules >3)
  • Ubuntu 16.04 (last ubuntu image in AWS - include php7 by default)
    I ended up with a 3.2 zabbix in Ubuntu 16.04 with php7 .. install went well .

However as I still faced to blank page , the last error related to PHP was:
-- Uncaught Error: Call to undefined function mb_strlen() in /usr/share/zabbix/include/classes/user/CProfile.php

a quick search recommend to update/install php-mbstring

et voila,, landing page showed up !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants