• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Running on PHP 5.4

    Scheduled Pinned Locked Moved
    Feature Request
    3
    9
    4.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Adrian Zaugg
      last edited by

      Please upgrade the code of FOG to run under PHP 5.4.

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        I run PHP 5.4

        All seems to work as expected!

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • A
          Adrian Zaugg
          last edited by

          [quote=“Tom Elliott, post: 18232, member: 7271”]I run PHP 5.4

          All seems to work as expected![/quote]

          After correcting some code in the TaskScheduler, it starts to work. Can you add members to groups for e.g.? Don’t you have an apache log full of errors like this:
          nit.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: id in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: imageid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: sub in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: snapinid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: userid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: storagegroupid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: storagenodeid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: crit in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: sort in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: userid in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: confirm in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: tab in /var/www/fog/commons/init.php on line 5, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: fog_user in /var/www/fog/management/index.php on line 44, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined index: uname in /var/www/fog/management/includes/processlogin.include.php on line 17, referer: [url]http://absinth/fog/management/index.php[/url]
          [Thu Oct 17 00:30:11 2013] [error] [client 129.132.209.100] PHP Notice: Undefined variable: Proxy in /var/www/fog/commons/functions.include.php on line 3506, referer: [url]http://absinth/fog/management/index.php?node=images[/url]
          …

          1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott
            last edited by

            What version of fog are you using?

            0.32 is not what I’m modifying, but I assure you 0.33b is running fine on php 5.4

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • A
              Adrian Zaugg
              last edited by

              It is 0.32.

              If 0.33 gets further delayed for various reasons, it would be nice a PHP devel could port the existing to work on PHP 5.4. and release it as 0.32.1 or so. I think there are many people out there, who do not want to feed their work horse beta carrots and use 0.32 until 0.33 will be released. Unfortunately Debian squeeze is already oldstable and wheezy brings PHP 5.4.

              I guess for a resonable talented PHP developper it shouldn’t take too long to port the code, it’s just very uninspiring work to do…

              1 Reply Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott
                last edited by

                While I’m sure I could figure out how to fix this issue, it seems rather odd that you only have to replace a few referenced variables, when there’s actually quite a bit throughout the pages. It only errors at specific times. In 0.33 there’s also a ton of referenced variables. If we had a listing of all the ‘deprecated’ code used that’s causing the issue, I might have a better standpoint. But seeing as this issue seemed to be irrelevant in php releases prior to 5.4, why not setup your apt-get repo’s to point to the squeeze / oldstable branches, degrade php 5.4 to php 5.3, exclude with apt-mark hold, then change the repo’s back to wheeze branch?

                I’m not too familiar with debian, but this ought to do the job for you.

                I know it’s a little extra work, but ultimately it’s easier to do that than have to wait for a developer to change all the ‘deprecated’ code through all of the files.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • A
                  Adrian Zaugg
                  last edited by

                  [quote=“Tom Elliott, post: 18239, member: 7271”]degrade php 5.4 to php 5.3, exclude with apt-mark hold, then change the repo’s back to wheeze branch?
                  [/quote]

                  This is easy, but there will be a time when squeeze gets unsupported. It doesn’t seem to me that 0.33 will be released in the somewhat near future. And what if there are other PHP projects from wheezy running on that server that do require php 5.4? So your suggestion is just a work around.

                  For those who want to know, how to downgrade php on Debian wheezy to 5.3 from squeeze to use with fog: Use apt-pinning.

                  • add squeeze to /etc/apt/sources.list: deb [url]http://ftp.debian.org/debian/[/url] squeeze main contrib non-free
                  • create /etc/apt/preferences.d/preferences:

                  Package: php5*
                  Pin: release a=oldstable
                  Pin-Priority: 700

                  Package: libapache2-mod-php5
                  Pin: release a=oldstable
                  Pin-Priority: 700

                  Package: *
                  Pin: release a=stable
                  Pin-Priority: 600

                  • save your php.inis from /etc/php5/cli/php.ini and /etc/php5/apache/php.ini to where ever
                    -> you will need them again, when upgrading back to php 5.4
                  • apt-get update
                  • apt-get dist-upgrade
                  • review the php.inis
                  • service FOGImageReplicator restart
                  • service FOGMulticastManager restart
                  • service FOGScheduler restart
                  • service apache2 restart
                  1 Reply Last reply Reply Quote 0
                  • G
                    Gilou
                    last edited by

                    Those are just notices, so you can safely ignore them, or disable the E_NOTICE level in error_reporting. If you have reference passing errors, you can remove them by replacing &$tmp by $tmp in most PHP files.

                    1 Reply Last reply Reply Quote 0
                    • G
                      Gilou
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post

                      157

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project