PHP 7.3.1
Posted: Tue Feb 05, 2019 5:50 pm
Use the following command to configure PHP 7.3.1:
NOTICE: In PHP 5.6.20, the mysql flag was "--with-mysql" but it was removed from PHP 7.3.1. Instead, "--with-pdo-mysql" is added. The former flag reported an error while the latter one completed without an error.
Make completed without errors:
Make test came back with some errors:
Install PHP 7.3.1:
After the installation is completed, the following line will be added to httpd.conf:
Also, the following line needs to be added to httpd.conf as well. Otherwise, browsers will save the php instead of showing the page.
phpBB3.2 also needs to have the following driver change in config.php:
For php5, it uses mysql driver:
For php7, it uses mysqli driver instead (notice the extra i in the end):
If the driver doesn't get changed in config.php, the following error will show:
The only annoying thing left after the upgrade is phpBB starts to show the following warning message:
Found a post (https://area51.phpbb.com/phpBB/viewtopi ... 61#p305156) that suggested changing the function twig_length_filter(Twig_Environment $env, $thing)
From:
To:
Some people on the forum said phpBB3.2 supports until PHP 7.1 and phpBB3.3 supports higher versions of PHP.
I may need to find some time to upgrade phpBB to newer version. I currently run 3.2.0 but the latest version is 3.2.5, not 3.3.x.
Code: Select all
# ./configure --with-apxs2=/usr/local/apache2/bin/apxs CFLAGS=-std=gnu99 --with-pdo-mysql --with-mysqli
Make completed without errors:
Code: Select all
# make
Code: Select all
# make test
..........
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #66731: file: extensive backtraking, with pcre.jit=0 [ext/fileinfo/tests/cve-2014-3538-nojit.phpt]
Test lstat() and stat() functions: usage variations - effects of is_dir() [ext/standard/tests/file/lstat_stat_variation10.phpt]
int stream_socket_sendto ( resource $socket , string $data [, int $flags = 0 [, string $address ]] ); [ext/standard/tests/streams/stream_socket_sendto.phpt]
Fundamental breakpoints functionality [sapi/phpdbg/tests/breakpoints_001.phpt]
Preserve breakpoints on restart [sapi/phpdbg/tests/breakpoints_002.phpt]
Test deleting breakpoints [sapi/phpdbg/tests/breakpoints_003.phpt]
Test opcode breakpoints [sapi/phpdbg/tests/breakpoints_004.phpt]
Test breakpoint into function context [sapi/phpdbg/tests/breakpoints_005.phpt]
Basic function breakpoints [sapi/phpdbg/tests/breakpoints_006.phpt]
Test namespaced and non-lowercase breakpoint names [sapi/phpdbg/tests/breakpoints_008.phpt]
Bug #73704 (phpdbg shows the wrong line in files with shebang) [sapi/phpdbg/tests/bug73704.phpt]
Cleaning must preserve breakpoints [sapi/phpdbg/tests/clean_001.phpt]
Test clearing breakpoints [sapi/phpdbg/tests/clear_001.phpt]
Properly handle exceptions going to be uncaught [sapi/phpdbg/tests/exceptions_001.phpt]
Test exceptions in eval during exception [sapi/phpdbg/tests/exceptions_002.phpt]
Ensure proper saving of EX(opline) [sapi/phpdbg/tests/generator_run.phpt]
include_once must include only once [sapi/phpdbg/tests/include_once.phpt]
Test basic info functionality [sapi/phpdbg/tests/info_001.phpt]
A script with die() must end "normally" [sapi/phpdbg/tests/normal_exit.phpt]
Test phpdbg_break_next() function [sapi/phpdbg/tests/phpdbg_break_next.phpt]
Getting executable lines from custom wrappers [sapi/phpdbg/tests/phpdbg_get_executable_stream_wrapper.phpt]
Test phpdbg_*_oplog() functions [sapi/phpdbg/tests/phpdbg_oplog_001.phpt]
phpdbg_end_oplog() alone must not crash [sapi/phpdbg/tests/phpdbg_oplog_002.phpt]
Test argv passing [sapi/phpdbg/tests/run_001.phpt]
Stdin and escaped args being passed to run command [sapi/phpdbg/tests/run_002.phpt]
set_exception_handler() in phpdbg [sapi/phpdbg/tests/set_exception_handler.phpt]
Test stdin input with breakpoints [sapi/phpdbg/tests/stdin_001.phpt]
Test simple recursive watchpoint [sapi/phpdbg/tests/watch_001.phpt]
Test simple array watchpoint with replace [sapi/phpdbg/tests/watch_002.phpt]
Test simple watchpoint with replace [sapi/phpdbg/tests/watch_003.phpt]
Test detection of inline string manipulations on zval watch [sapi/phpdbg/tests/watch_004.phpt]
Test proper watch comparisons when having multiple levels of indirection from a zval to its value [sapi/phpdbg/tests/watch_005.phpt]
Test multiple watch elements pointing to the same watchpoint [sapi/phpdbg/tests/watch_006.phpt]
=====================================================================
You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it. You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]: y
Code: Select all
# make install
Installing PHP SAPI module: apache2handler
/usr/local/apache2.4.25/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libphp7.la /usr/local/apache2.4.25/modules
/usr/local/apr/build-1/libtool --mode=install install libphp7.la /usr/local/apache2.4.25/modules/
libtool: install: install .libs/libphp7.so /usr/local/apache2.4.25/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /usr/local/apache2.4.25/modules/libphp7.la
libtool: install: warning: remember to run `libtool --finish /home/work/system_apps/php-7.3.1/libs'
chmod 755 /usr/local/apache2.4.25/modules/libphp7.so
[activating module `php7' in /usr/local/apache2.4.25/conf/httpd.conf]
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-zts-20180731/
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/php/man/man1/
Installing phpdbg binary: /usr/local/bin/
Installing phpdbg man page: /usr/local/php/man/man1/
Installing PHP CGI binary: /usr/local/bin/
Installing PHP CGI man page: /usr/local/php/man/man1/
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - upgraded: 1.4.4
[PEAR] Console_Getopt - already installed: 1.4.1
[PEAR] Structures_Graph- already installed: 1.1.1
pear/pear dependency package "pear/XML_Util" downloaded version 1.4.3 is not the recommended version 1.3.0, but may be compatible, use --force to install
pear/XML_Util cannot be installed, conflicts with installed packages
[PEAR] XML_Util - upgraded: 1.4.3
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/work/system_apps/php-7.3.1/pear/install-pear-nozlib.phar/PEAR/PackageFile/v1.php on line 1424
[PEAR] PEAR - upgraded: 1.10.7
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
/home/work/system_apps/php-7.3.1/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f phar.phar /usr/local/bin/phar
Installing PDO headers: /usr/local/include/php/ext/pdo/
Code: Select all
LoadModule php7_module modules/libphp7.so
Code: Select all
AddHandler php7-script .php
For php5, it uses mysql driver:
Code: Select all
$dbms = 'phpbb\\db\\driver\\mysql';
Code: Select all
$dbms = 'phpbb\\db\\driver\\mysqli';
Code: Select all
=======================================================
General Error
SQL ERROR [ mysql4 ]
mysql_connect function does not exist, is mysql extension installed? []
An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
===================================================
Code: Select all
[ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
From:
Code: Select all
function twig_length_filter(Twig_Environment $env, $thing)
{
return is_scalar($thing) ? mb_strlen($thing, $env->getCharset()) : count($thing);
}
Code: Select all
function twig_length_filter(Twig_Environment $env, $thing)
{
if (null === $thing) {
return 0;
}
if (is_scalar($thing)) {
return mb_strlen($thing, $env->getCharset());
}
if (is_object($thing) && method_exists($thing, '__toString') && !$thing instanceof \Countable) {
return mb_strlen((string) $thing, $env->getCharset());
}
if ($thing instanceof \Countable || is_array($thing)) {
return count($thing);
}
return 1;
}
I may need to find some time to upgrade phpBB to newer version. I currently run 3.2.0 but the latest version is 3.2.5, not 3.3.x.