Ad Widget

Collapse

Zabbix does not apply changes from php.ini files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • laevateinn
    Junior Member
    • Sep 2024
    • 1

    #1

    Zabbix does not apply changes from php.ini files

    Hello guys,
    So recently I tried to experiment with Zabbix. When I went to Zabbix UI URL, it said that some values do not match the required. I have configured all of the php.ini file in /etc/php/8.3 to required values and restart > enable > status after every single one of them. But the Zabbix UI still said that the values are still in pre-configured value. What is the problem here and what can I do to resolve this?
    Thank you very much.

    Click image for larger version  Name:	php.png Views:	7 Size:	4.8 KB ID:	491795

    Click image for larger version  Name:	Untitled.png Views:	0 Size:	68.6 KB ID:	491794
    Last edited by laevateinn; 27-09-2024, 04:15.
  • randomUser9212123
    Junior Member
    • Nov 2024
    • 2

    #2
    I have the same problem - with Ubuntu LTS 22 and PHP 8.1 there (8.1.2-1ubuntu2.19) - the latest Zabbix installed following instructions so 7.0.

    PHP checker gave "fail" for "post_max_size (was 8M shoud be 16M) and "max_input_time" (was 60 should be 300);

    I changed both of them in php settings then restarted Apache, PHP and all zabbix components. Still I get the same errors

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Originally posted by randomUser9212123
      PHP checker gave "fail" for "post_max_size (was 8M shoud be 16M) and "max_input_time" (was 60 should be 300);

      I changed both of them in php settings then restarted Apache, PHP and all zabbix components. Still I get the same errors
      If you're using php-fpm, which is the modern default, you don't need to restart Apache but you do need to restart php-fpm.

      Did you make the change to the main php.ini file, or did you make the change at the work pool level for whatever pool of workers is servicing the Zabbix front end (probably the 'www' pool, but you can use whatever pool you want)?

      Comment

      • moooola
        Junior Member
        • Jul 2024
        • 29

        #4
        Hello.

        In my environment, I modify the end of /etc/php/8.3/fpm/pool.d/www.conf as follows.

        ; Default Value: nothing is defined by default except the values ​in php.ini and
        ; specified at startup with the -d argument
        ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]
        ;php_flag[display_errors] = off
        ;php_admin_value[error_log] = /var/log/fpm-php.www.log
        ;php_admin_flag[log_errors] = on
        ;php_admin_value[memory_limit] = 32M
        php_value[max_execution_time] = 300
        php_value[memory_limit] = 128M
        php_value[post_max_size] = 16M
        php_value[upload_max_filesize] = 2M
        php_value[max_input_time] = 300
        php_value[max_input_vars] = 10000
        php_value[always_populate_raw_post_data] = -1
        php_value[date.timezone] = Asia/Tokyo​

        Comment

        • randomUser9212123
          Junior Member
          • Nov 2024
          • 2

          #5
          Thank you very much moooola - this solved the issues for me.

          First changes to /etc/php/8.1/apache2/php.ini but had no effect - perhaps if done before installing Zabbix that would have worked.
          Then changes to /etc/php/8.1/fpm/pool.d/www.conf as suggested, at the end of the file the php_value that needed changing.

          Comment

          Working...