Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

PHP 5.6 and PHP 7

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
augustin
Guru
Guru
Posts: 318
Joined: Mon Feb 23, 2015 7:31 pm

PHP 5.6 and PHP 7

  • Quote

Post by augustin » Thu Feb 23, 2017 3:46 pm

I just saw that PHP 7 is currently being pushed on stable amd64, upgrading from PHP 5.6.
I have critical legacy software that will certainly break with PHP 7.

I saw the documentation on the wiki:
Running multiple versions of PHP
https://wiki.gentoo.org/wiki/PHP#Runnin ... ons_of_PHP
I added to make.conf:

Code: Select all

PHP_TARGETS="php5-6 php7-0" 
Now when I emerge update, I get, among other things:

Code: Select all

[ebuild  NS    ]  virtual/httpd-php-7.0 [5.6]
[ebuild  NS    ] dev-lang/php-7.0.15 [5.6.30] USE="acl apache2 berkdb bzip2 cjk cli crypt ctype curl exif fileinfo filter fpm gd gdbm hash iconv ipv6 json ldap mysql mysqli nls opcache phar posix readline session simplexml spell ssl tokenizer truetype unicode xml xslt zlib -bcmath -calendar -cdb -cgi -coverage -debug -embed -enchant (-firebird) -flatfile -ftp -gmp -imap -inifile -intl -iodbc -kerberos -ldap-sasl -libedit (-libressl) -mhash -mssql -oci8-instant-client -odbc -pcntl -pdo -phpdbg -postgres -qdbm -recode (-selinux) -sharedmem -snmp -soap -sockets -sqlite -systemd -sysvipc -threads -tidy -wddx -webp -xmlreader -xmlrpc -xmlwriter -xpm -zip" 
[ebuild   R    ] dev-php/pecl-geoip-1.1.1-r2  PHP_TARGETS="php7-0*" 
the emerge man page says:

Code: Select all

       [ebuild NS ] dev-libs/glib-2.4.7
              You already have a version of glib installed, but a 'new' version in a different SLOT is available.
I am not totally clear what it exactly means.
Does "[ebuild NS ] dev-lang/php-7.0.15 [5.6.30] " actually mean that PHP 7.0 will be installed alongside 5.6?
I am safe to go?

I guess then I use eselect php list apache2 to select the php version to run with Apache.
Can't apache run with both, with the exact handler to be used being configured in the vhosts settings?
Top
saboya
Guru
Guru
Posts: 557
Joined: Tue Nov 28, 2006 10:28 am
Location: Brazil

  • Quote

Post by saboya » Thu Feb 23, 2017 4:05 pm

N means it's a new package.
S means it's a slotted package.

So yes, you are safe to go. You can do emerge -p --depclean to check if the system is going to try to remove something. If that's the case you need to review your settings again.

About apache2 per-vhost settings: Can't help you there.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

Re: PHP 5.6 and PHP 7

  • Quote

Post by Ant P. » Fri Feb 24, 2017 10:28 pm

augustin wrote:Can't apache run with both, with the exact handler to be used being configured in the vhosts settings?
Apache has no problem talking to multiple concurrent versions of PHP. Just use ProxyPassMatch to point at the php-fpm socket, you can set a different one per-<Location> if need be.
Top
augustin
Guru
Guru
Posts: 318
Joined: Mon Feb 23, 2015 7:31 pm

  • Quote

Post by augustin » Sat Feb 25, 2017 1:33 am

Thank you both. I'll set some time aside to proceed with the upgrade. Thanks. :)
Top
augustin
Guru
Guru
Posts: 318
Joined: Mon Feb 23, 2015 7:31 pm

  • Quote

Post by augustin » Tue Mar 07, 2017 2:56 am

Thanks again.

PHP 7.0 was emerged smoothly.
By default, everything still uses 5.6, so nothing broke! :)

# eselect php list cli
[1] php5.6 *
[2] php7.0
# eselect php list apache2
[1] php5.6 *
[2] php7.0
I can now take my time to slowly test PHP 7.0 on selected web sites.
Top
Post Reply

5 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic