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

    PHP 7.0.0 finally Released

    Scheduled Pinned Locked Moved
    Announcements
    php 7.0.0
    6
    23
    18.3k
    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.
    • Tom ElliottT
      Tom Elliott
      last edited by

      Fedora 23 (maybe 22 but may need to change RPM to install)

      rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-23.rpm
      dnf config-manager --set-enabled remi-php70
      dnf -y update
      

      Fedora 22 Would most likely be:

      rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-22.rpm
      dnf config-manager --set-enabled remi-php70
      dnf -y update
      

      Install fog like you normally would.

      Ubuntu 15.10 (and Others I suppose) (as long as you’re running trunk)

      sudo sed -e 's/php5-.*[[:space:]]/php7\.0-\*/g' -e 's/php5/php7\.0/g' -i /opt/fog/.fogsettings
      sudo rm -rf /etc/apache2/mods-enabled/php5.load
      sudo apt-get -f purge libapache2-mod-php5 php5-fpm* php5*
      sudo add-apt-repository -y ppa:ondrej/php-7.0
      sudo apt-get update
      

      The fog installer for Ubuntu (possibly debian?) will not work either. All thanks to their excessive use of using the version as the enabling/disabling items.

      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
      • Q
        Quazz Moderator
        last edited by

        Just wanted to mention that the code listed here for Ubuntu removes all packages from .fogsettings except apache and php7.0, it also incorrectly adds php7.0-*libapache2-mod-php7.0 (when it should be libapache2-mod-php7.0)

        1 Reply Last reply Reply Quote 0
        • JJ FullmerJ
          JJ Fullmer Testers
          last edited by

          I just saw this post and decided “I Want!”
          Hopefully I don’t break anything…
          I have centos7 and I was about to follow these guides
          https://webtatic.com/packages/php70/
          http://tecadmin.net/install-php-7-on-centos/#

          But first I’m trying the centos version of @Tom-Elliott’s fedora instructions
          being

          rpm -Uvh  http://rpms.remirepo.net/enterprise/remi-release-7.rpm
          yum-config-manager --enable remi-php70
          yum -y update
          

          Will report back

          Have you tried the FogApi powershell module? It's pretty cool IMHO
          https://github.com/darksidemilk/FogApi
          https://fogapi.readthedocs.io/en/latest/
          https://www.powershellgallery.com/packages/FogApi
          https://forums.fogproject.org/topic/12026/powershell-api-module

          JJ FullmerJ 1 Reply Last reply Reply Quote 0
          • JJ FullmerJ
            JJ Fullmer Testers @JJ Fullmer
            last edited by JJ Fullmer

            @Arrowhead-IT I ran

            rpm -Uvh  http://rpms.remirepo.net/enterprise/remi-release-7.rpm
            yum-config-manager --enable remi-php70
            yum -y update
            

            Then updated to the latest trunk

            I didn’t see it do anything different with php packages in the FOG install, certainly did in yum -y update though.
            Not sure how to tell which version of php that fog is using. I’m sure there’s a way but I don’t know it off the top of my head.
            I know that php 7 is indeed installed though

            php -v
            
            PHP 7.0.3 (cli) (built: Feb  3 2016 11:30:45) ( NTS )
            Copyright (c) 1997-2016 The PHP Group
            Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
            

            The dashboard certainly did load noticeably faster too.
            So I think that the above method did the trick.
            You may not even need to add the rpm, just enable remi-php70 with yum config mngr. It told me I already had the repo when I added it.

            Hope this helps someone else update too.

            Have you tried the FogApi powershell module? It's pretty cool IMHO
            https://github.com/darksidemilk/FogApi
            https://fogapi.readthedocs.io/en/latest/
            https://www.powershellgallery.com/packages/FogApi
            https://forums.fogproject.org/topic/12026/powershell-api-module

            Wayne WorkmanW 1 Reply Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman @JJ Fullmer
              last edited by

              @Arrowhead-IT said:

              The dashboard certainly did load noticeably faster too.

              There are large improvements in efficiency, I understand. It’s one of the best reasons to move to 7. Of course there are likely security and functionality improvements as well.

              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!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • Q
                Quazz Moderator
                last edited by

                On ubuntu (after manually setting up the packages for php7.0 in .fogsettings) the install script fails at backing up database.

                Also, there is no php7.0-mysqlnd yet as far as I know, so using version 5 for now.

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

                  @Quazz This is really why I say to play with Ubuntu.

                  I’ve added code to the installer to help with ubuntu when I can figure out what’s going on and needed for PHP 7 to work. One of the dependencies I’ve noticed is not used as a service, which is php-fpm.

                  I can install php7.0-fpm, but there is not a service file associated with it.

                  This is why the instructions I gave in this posting: https://forums.fogproject.org/topic/6285/php-7-0-0-finally-released/2# was not really saying you SHOULD use php 7.0 on debian/ubuntu as I don’t know what info to call out and what not to call out.

                  I have tried installing php 7.0 on Ubuntu 15.10 and Debian 8 but I have not had any luck on getting it to work.

                  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

                  Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman @Tom Elliott
                    last edited by

                    @Tom-Elliott said:

                    This is really why I say to play with Ubuntu.

                    That’s confusing.

                    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!
                    Daily Clean Installation Results:
                    https://fogtesting.fogproject.us/
                    FOG Reporting:
                    https://fog-external-reporting-results.fogproject.us/

                    1 Reply Last reply Reply Quote 0
                    • d4rk3D
                      d4rk3
                      last edited by

                      I’m running pure PHP 7.0 on four different Ubuntu Server 15.10 servers…let me know how I can help!

                      MRCURM 1 Reply Last reply Reply Quote 0
                      • MRCURM
                        MRCUR Testers @d4rk3
                        last edited by

                        @d4rk3 Are you running FOG on them?

                        d4rk3D 1 Reply Last reply Reply Quote 0
                        • d4rk3D
                          d4rk3 @MRCUR
                          last edited by

                          @MRCUR No…just hopes and dreams.

                          Of course I’m running FOG on them lol…two normal servers and two storage nodes.

                          Q 1 Reply Last reply Reply Quote 1
                          • Q
                            Quazz Moderator @d4rk3
                            last edited by

                            @d4rk3 Could you go through the steps on how to make it work?

                            1 Reply Last reply Reply Quote 0
                            • d4rk3D
                              d4rk3
                              last edited by d4rk3

                              Update (don’t install yet) to the latest trunk via Git or SVN, then…

                              Edit /opt/fog/.fogsettings (or just comment out this line):

                              packages=''
                              

                              Purge everything php5:

                              sudo service apache2 stop
                              
                              sudo apt-get purge -y php5 php5-common php5-json php5-gd php5-cli php5-curl php5-mysqlnd php5-fpm php5-mcrypt php5-readline libapache2-mod-php5
                              
                              sudo rm -rf /etc/apt/sources.list.d/ondrej-ubuntu-php5-5_6-wily.list
                              sudo rm -rf /etc/apache2/mods-enabled/php5.conf
                              sudo rm -rf /etc/apache2/mods-enabled/php5.load
                              

                              Install php7.0:

                              sudo add-apt-repository -y ppa:ondrej/php-7.0
                              
                              sudo apt-get update
                              
                              sudo apt-get install -y libapache2-mod-php7.0 php7.0 php7.0-phpdbg php7.0-readline php7.0-cgi libphp7.0-embed php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-json php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-gd php php-cli php-common php-curl php-gd php-mcrypt php-mysql php-readline
                              

                              Edit /lib/ubuntu/config.sh (lines 19-23, 81, delete line 82):

                              php_ver=7.0
                              php_verAdds="-7.0"
                              repo="php${php_verAdds}"
                              [[ $php_ver != 7.0 ]] && phpcmd="php" || phpcmd="php"
                              [[ $php_ver != 7.0 ]] && phpfpm="php-fpm${php_ver}" || phpfpm="php7.0-fpm"
                              
                              [[ $php_ver != 7.0 ]] && phpini="/etc/$phpcmd/$php_ver/apache2/php.ini" || phpini="/etc/$phpcmd/$php_ver/apache2/php.ini"
                              

                              That’s it 🙂 then install the current trunk that you already updated to and the install should finish without errors.

                              If I had to guess I’d imagine that my work on config.sh could be simplified or improved but this always works and I don’t ever have to worry about php5 trying to re-install via .fogsettings.

                              Please feel free to use any/all of these steps as any of you please. I’m no expert on php but I can’t see any reason why the latest FOG shouldn’t be pure php7.0.

                              Feedback is always welcome 🙂

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

                                I’ve modified the installer a bit to allow for this.

                                If you want to give this a shot, yes you will have to first remove all of the existing php5 stuff.

                                I do it simpler with:

                                apt-get purge -y php* lib*php

                                However you do it is up to you.

                                I’ve made it so you can actually just add the info to your /opt/fog/.fogsettings (of course remove the packages as described as well.

                                Instead of modifying the core installer information add these lines to your .fogsettings file – before the packages line:

                                php_ver="7.0"
                                php_verAdds="-7.0"
                                repo="php-${php_ver}"
                                

                                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

                                Q 1 Reply Last reply Reply Quote 2
                                • Q
                                  Quazz Moderator @d4rk3
                                  last edited by

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • Q
                                    Quazz Moderator @Tom Elliott
                                    last edited by Quazz

                                    @Tom-Elliott This works, except it looks for php.ini in /etc/php/apache2/php.ini rather than /etc/php/apache2/7.0/php.ini (which causes the install to fail)

                                    Have to admit I’m not a fan of how they decided to change basic structures like that.

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

                                      @Quazz that doesn’t make any sense.

                                      The path found should be /etc/php/7.0/apache2/php.ini or /etc/php5/apache2/php.ini

                                      I don’t quite understand why yours is backwards.

                                      The line that handles this in lib/ubuntu/config.php is 81.

                                      Here’s what I have it set as:

                                      [[ $php_ver != 5 ]] && phpini="/etc/$phpcmd/$php_ver/apache2/php.ini" || phpini="/etc/$phpcmd/apache2/php.ini"

                                      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

                                      Q 1 Reply Last reply Reply Quote 0
                                      • Q
                                        Quazz Moderator @Tom Elliott
                                        last edited by

                                        @Tom-Elliott Thanks for the help, looks like the updating to the newest version didn’t properly merge the config file so it still had php_ver set to 7.0 which would produce the results I experienced.

                                        I can confirm that it works now.

                                        1 Reply Last reply Reply Quote 0
                                        • d4rk3D
                                          d4rk3
                                          last edited by

                                          Awesome! I’m glad this is helping people update to php7.0…the performance increase is very worth it!

                                          1 Reply Last reply Reply Quote 0
                                          • Q
                                            Quazz Moderator
                                            last edited by

                                            Latest svn update causes install to fail at php7.0-mbstring (as it does not exist), which is rather confusing as I can’t find that package in the ubuntu install script or anywhere else for that matter.

                                            Tom ElliottT 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            149

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project