Solved php56 --> php70 fail

Hi all,

I used ports-mgmt/synth to upgrade my server from lang/php56 to lang/php70 this evening.

Reinstalling www/joomla3 www/nextcloud and several other PHP-based applications appears to have pulled in all the necessary php70 dependencies, but something nonetheless went wrong, and now they are all broken.

In httpd-error log nextcloud generates this error:

Code:
PHP Fatal error:  Class 'PDO' not found in /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php on line 172
The roundcube error:

Code:
PHP Fatal error:  Call to undefined function filter_var() in /usr/local/www/roundcube/program/lib/Roundcube/bootstrap.php on line 45,
In Joomla I see this:

Code:
Fatal error: Call to undefined function session_get_cookie_params() in
I'm at a complete loss to know what went wrong here. I've migrated from earlier PHP versions before and never encountered such problems. Does anyone have any ideas for me?

Thanks

Code:
$ php --version
PHP 7.0.21 (cli) (built: Jul 12 2017 20:13:18) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
 
Code:
pkg info -x 'php*'
mod_php56-5.6.31
php70-7.0.21
php70-bz2-7.0.21
php70-ctype-7.0.21
php70-curl-7.0.21
php70-dom-7.0.21
php70-exif-7.0.21
php70-fileinfo-7.0.21
php70-filter-7.0.21
php70-gd-7.0.21
php70-gettext-7.0.21
php70-hash-7.0.21
php70-iconv-7.0.21
php70-intl-7.0.21
php70-json-7.0.21
php70-mbstring-7.0.21_1
php70-mcrypt-7.0.21
php70-mysqli-7.0.21
php70-openssl-7.0.21
php70-pdo-7.0.21
php70-pdo_mysql-7.0.21
php70-posix-7.0.21
php70-pspell-7.0.21
php70-session-7.0.21
php70-simplexml-7.0.21
php70-wddx-7.0.21
php70-xml-7.0.21
php70-xmlreader-7.0.21
php70-xmlrpc-7.0.21
php70-xmlwriter-7.0.21
php70-xsl-7.0.21
php70-zip-7.0.21
php70-zlib-7.0.21
phpMyAdmin-4.7.2
py27-cryptography-1.7.2
zenphoto-1.4.14

Code:
 php -m
[PHP Modules]
bz2
Core
ctype
curl
date
dom
exif
fileinfo
filter
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcre
PDFlib
PDO
pdo_mysql
posix
pspell
Reflection
session
SimpleXML
SPL
standard
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]
Does this look OK?
 
Not quite:
Code:
mod_php56-5.6.31
That will need to be replaced with mod_php70.
 
Done.

Unfortunately I am now getting a segfault error in /var/log/httpd-error.log:
Code:
[Thu Jul 13 08:26:49.990396 2017] [core:notice] [pid 22438] AH00052: child pid 22443 exit signal Segmentation fault (11)
 
Perhaps I should be a little clearer. Apache restarts OK, but when I try to open a page I see this in the error log:
Code:
[Thu Jul 13 08:35:07.605714 2017] [mpm_prefork:notice] [pid 23388] AH00163: Apache/2.4.26 (FreeBSD) OpenSSL/1.0.2k-freebsd PHP/5.6.31 PHP/5.6.31 configured -- resuming normal operations
[Thu Jul 13 08:35:07.605770 2017] [core:notice] [pid 23388] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Thu Jul 13 08:35:08.611463 2017] [core:notice] [pid 23388] AH00052: child pid 23393 exit signal Segmentation fault (11)
[Thu Jul 13 08:35:08.611549 2017] [core:notice] [pid 23388] AH00052: child pid 23392 exit signal Segmentation fault (11)
[Thu Jul 13 08:35:08.611584 2017] [core:notice] [pid 23388] AH00052: child pid 23390 exit signal Segmentation fault (11)
[Thu Jul 13 08:35:08.611616 2017] [core:notice] [pid 23388] AH00052: child pid 23389 exit signal Segmentation fault (11)
[Thu Jul 13 08:35:12.669029 2017] [core:notice] [pid 23388] AH00052: child pid 23391 exit signal Segmentation fault (11)
 
OK, no more segfaults: I found I also needed to rebuild the www/apache24 package with synth; apparently it was built against (?) php56, or something. I also neeed to edit apache24/httpd.conf and update this reference to php7
Code:
<IfModule mod_php7.c>

Joomla is working again, but not roundcube or nextcloud; still working on those...
 
OK, everything is working now with php70. Once I rebuilt devel/pecl-ACPu with synth, nextcloud was happy again. roundcube is fine too, just had some momentary browser weirdness there.
 
Back
Top