/opt/alt/phpXX/etc/php.ini changed (bug?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • martin.heinrich91
    Junior Member
    • Mar 2021
    • 6

    #1

    /opt/alt/phpXX/etc/php.ini changed (bug?)

    Does updates automatically change php.ini files?
  • morten
    Senior Member
    • Aug 2017
    • 129

    #2
    Hello,

    As the description on this thread I have noticed on old servers that our settings are reversed.
    We usally change some settings in these files:
    /opt/alt/php53/etc/php.ini
    /opt/alt/php54/etc/php.ini
    /opt/alt/php55/etc/php.ini
    /opt/alt/php56/etc/php.ini
    /opt/alt/php70/etc/php.ini

    Normally I only change these settings:
    memory_limit = 384M;
    post_max_size = 32M;
    upload_max_filesize = 32M;
    expose_php = Off
    allow_url_fopen = On
    date.timezone = "Europe/Berlin"

    When checking some servers today I see that these are back to defaults.
    Is this correct? Are you changing these files to defaults when doing yum update?

    I saw the file is changed this night:
    -rw-r--r-- 1 root linksafe 45K Oct 12 03:37 /opt/alt/php53/etc/php.ini

    Could you please shed some light on this and give me a solution where the files are not changed or fix it if its a bug?

    Comment

    • bogdan.sh
      Administrator
      • Nov 2016
      • 1219

      #3
      Hello,

      We do change “error_log” and “date.timezone” in that files, recommend using /etc/cl.selector/global_php.ini to make them permanent. More: http://kb.cloudlinux.com/2015/09/why...t-php-updates/

      Comment

      • morten
        Senior Member
        • Aug 2017
        • 129

        #4
        Thanks for you reply.

        So basically if I add these values in the global_php.ini file they will update in all the /opt/alt/phpXX/etc/php.ini files and will not be overwritten?

        Like this:
        ; This file provides global settings for php.ini of all alt-php packages
        ; The structure of this file:
        ; option = value
        ; To confirm changes please run:
        ; /usr/sbin/cagefsctl --setup-cl-selector
        [Global PHP Settings]
        memory_limit = 384M;
        post_max_size = 32M;
        upload_max_filesize = 32M;
        expose_php = Off
        allow_url_fopen = On
        date.timezone = "Europe/Berlin"

        And then run cagefsctl --setup-cl-selector ?

        Comment

        • bogdan.sh
          Administrator
          • Nov 2016
          • 1219

          #5
          Yes, that is right. And they would be applied to all existing and future alt-phpXX versions.

          Comment

          • morten
            Senior Member
            • Aug 2017
            • 129

            #6
            I have tested this and got most of them working, but the only line I cannot get updated is the date.timezone.
            Here is the content of my file:
            ; This file provides global settings for php.ini of all alt-php packages
            ; The structure of this file:
            ; option = value
            ; To confirm changes please run:
            ; /usr/sbin/cagefsctl --setup-cl-selector
            [Global PHP Settings]
            memory_limit = 384M
            post_max_size = 32M
            upload_max_filesize = 32M
            expose_php = Off
            allow_url_fopen = On
            date.timezone = "Europe/Oslo"
            max_input_vars = 6000

            After running cagefsctl --setup-cl-selector date.timezone still shows as:
            date.timezone = "UTC"
            On all /opt/alt/phpXX/etc/php.ini files. Could you give me some tips or is it a bug?

            Comment

            • sqh
              Member
              • Sep 2017
              • 92

              #7
              EDIT: Disregard my suggestion -- I see you already have looked at this.

              Comment

              • morten
                Senior Member
                • Aug 2017
                • 129

                #8
                Thanks for trying to help out Scott :-)
                Yes, I have tested on some servers now, but date.timezone is not updating as it should

                Comment

                • bogdan.sh
                  Administrator
                  • Nov 2016
                  • 1219

                  #9
                  You are right, date.timezone could not be changed with global_php.ini file, I was able to reproduce the issue on a test server. We have opened bugreport about this case, will rank it higher now. So far there is no nice solution for this, let wait when it will be fixed.

                  Comment

                  • morten
                    Senior Member
                    • Aug 2017
                    • 129

                    #10
                    Ok, thanks for checking this and hope you find a solution quick :-)
                    There are alot of error_logs filling up quite quickly because of UTC date.timezone!

                    Could you give me an update when this have been fixed?

                    Comment

                    • morten
                      Senior Member
                      • Aug 2017
                      • 129

                      #11
                      Any eta on a fix Bogdan?

                      Comment

                      • morten
                        Senior Member
                        • Aug 2017
                        • 129

                        #12
                        Found another bug now.
                        All lines I added to global_php.ini file have now been erased on all servers automatically!

                        Comment

                        • bogdan.sh
                          Administrator
                          • Nov 2016
                          • 1219

                          #13
                          There are no ETA yet on when date.timezone will be fixed with global_php.ini .

                          About lines removed from global_php.ini - I checked a bunch of servers, CL6 and CL7 , with different lvemanager/cagefs versions and custom lines are in place. Must be something specific to your setup. Any actions were done to this servers? Please create support ticket so we can investigate in place.

                          Comment

                          • bogdan.sh
                            Administrator
                            • Nov 2016
                            • 1219

                            #14
                            Hello,

                            The current incarnation of PHP-Selector is that it will not overwrite alt-php ini files if values in them are different from defaults as that could break websites functionality. You have to run a command with a key to overwrite them.

                            Please read more at http://docs.cloudlinux.com/index.htm...p_ini_opt.html

                            Comment

                            Working...