Author Topic: server switch to php7.1 failure  (Read 1453 times)

0 Members and 1 Guest are viewing this topic.

Offline
****
server switch to php7.1 failure
« on: January 31, 2018, 12:54:36 AM »
Apache & Varnish Cache & Nginx Reverse Proxy
CentOS 7.4.1708 (Core) - Kernel 3.10.0-693.17.1.el7.x86_64
Apache/2.4.2
nginx/1.12.2
PHP 5.6.30
PHP-FPM 5.4.16 (fpm-fcgi)
suPHP 0.7.2
Zend Engine v2.6.0 with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)
MySQL 10.1.30-MariaDB
SEL permitting
Mod Security disabled
CWPpro version: 0.9.8.438

After the background compilation the server still showing PHP 5.6.30 and php -v producing this output
Quote
Failed loading /usr/local/ioncube/ioncube_loader_lin_7.1.so:  /usr/local/ioncube/ioncube_loader_lin_7.1.so: undefined symbol: zend_interrupt_function
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/memcached.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
log
Quote
'ioncube_loader_lin_7.2_ts.so' -> '/usr/local/ioncube/ioncube_loader_lin_7.2_ts.so'
'loader-wizard.php' -> '/usr/local/ioncube/loader-wizard.php'
yes: standard output: Broken pipe
yes: write error


This is not pleasant experience, it is expected such switch to go smooth and without hiccup!
« Last Edit: January 31, 2018, 01:01:13 AM by n8v8r »

Offline
****
Re: server switch to php7.1 failure
« Reply #1 on: January 31, 2018, 01:03:48 AM »
Same thing happening with PPH7.0.27 and PHP5.6.33

Seems to be a global issue with broken pipe in ioncube/loader-wizard.php
« Last Edit: January 31, 2018, 01:07:53 AM by n8v8r »

Offline
****
Re: server switch to php7.1 failure
« Reply #2 on: January 31, 2018, 03:04:35 AM »
Rebuild the servers with PHP5.6.0 and excluded ioncube and not other fancy stuff and the scripts are still broken and not installing the wanted PHP version. The install scripts seem a bag of bugs (see red lines)

Quote
http://dl1.centos-webpanel.com/files/php/selector/el7/php-dependencies.sh
Resolving dl1.centos-webpanel.com (dl1.centos-webpanel.com)... 37.187.72.216
Connecting to dl1.centos-webpanel.com (dl1.centos-webpanel.com)|37.187.72.216|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 844 [application/x-sh]
Saving to: 'php-dependencies.sh'

     0K                                                       100% 92.3M=0s

2018-01-31 02:45:32 (92.3 MB/s) - 'php-dependencies.sh' saved [844/844]

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.netcologne.de
 * epel: mirror.23media.de
 * extras: mirror.tobias-wollmann.com
 * updates: mirror.netcologne.de
Package gcc-4.8.5-16.el7_4.1.x86_64 already installed and latest version
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Package gcc-c++-4.8.5-16.el7_4.1.x86_64 already installed and latest version
Package cpp-4.8.5-16.el7_4.1.x86_64 already installed and latest version
Package kernel-headers-3.10.0-693.17.1.el7.x86_64 already installed and latest version
Package libxml2-devel-2.9.1-6.el7_2.3.x86_64 already installed and latest version
Package autoconf-2.69-11.el7.noarch already installed and latest version
Package bison-3.0.4-1.el7.x86_64 already installed and latest version
Package git-1.8.3.1-12.el7_4.x86_64 already installed and latest version
No package checkinstall available.
Package 1:openssl-devel-1.0.2k-8.el7.x86_64 already installed and latest version
Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
Package bzip2-devel-1.0.6-13.el7.x86_64 already installed and latest version
Package libjpeg-turbo-devel-1.2.90-5.el7.x86_64 already installed and latest version
Package 2:libpng-1.5.13-7.el7_2.x86_64 already installed and latest version
Package 2:libpng-devel-1.5.13-7.el7_2.x86_64 already installed and latest version
Package freetype-2.4.11-15.el7.x86_64 already installed and latest version
Package freetype-devel-2.4.11-15.el7.x86_64 already installed and latest version
Package openldap-devel-2.4.44-5.el7.x86_64 already installed and latest version
Package postgresql-devel-9.2.23-3.el7_4.x86_64 already installed and latest version
Package 12:aspell-devel-0.60.6.1-9.el7.x86_64 already installed and latest version
Package 1:net-snmp-devel-5.7.2-28.el7_4.1.x86_64 already installed and latest version
Package libxslt-devel-1.1.28-5.el7.x86_64 already installed and latest version
Package uw-imap-devel-2007f-16.el7.x86_64 already installed and latest version
Package libicu-devel-50.1.2-15.el7.x86_64 already installed and latest version
Package 1:gmp-devel-6.0.0-15.el7.x86_64 already installed and latest version
Package libcurl-devel-7.29.0-42.el7_4.1.x86_64 already installed and latest version
Package libmcrypt-devel-2.5.8-13.el7.x86_64 already installed and latest version
Package pcre-devel-8.32-17.el7.x86_64 already installed and latest version
Package sqlite-devel-3.7.17-8.el7.x86_64 already installed and latest version
Package libdb4-devel-4.8.30-13.el7.x86_64 already installed and latest version
Package 1:enchant-devel-1.6.0-8.el7.x86_64 already installed and latest version
Package libXpm-devel-3.5.12-1.el7.x86_64 already installed and latest version
Package MariaDB-devel-10.1.30-1.el7.centos.x86_64 already installed and latest version
Package readline-devel-6.2-10.el7.x86_64 already installed and latest version
Package libedit-devel-3.0-12.20121213cvs.el7.x86_64 already installed and latest version
Package recode-devel-3.6-38.el7.x86_64 already installed and latest version
Package libtidy-devel-5.4.0-1.el7.x86_64 already installed and latest version
Package libtool-ltdl-devel-2.4.2-22.el7_3.x86_64 already installed and latest version
Package flex-2.5.37-3.el7.x86_64 already installed and latest version
Package libjpeg-turbo-devel-1.2.90-5.el7.x86_64 already installed and latest version
Package libcurl-devel-7.29.0-42.el7_4.1.x86_64 already installed and latest version
Package krb5-devel-1.15.1-8.el7.x86_64 already installed and latest version
Package krb5-libs-1.15.1-8.el7.x86_64 already installed and latest version
Package expat-devel-2.1.0-10.el7_3.x86_64 already installed and latest version
Nothing to do

Install Completed
###############################

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.netcologne.de
 * epel: mirror.23media.de
 * extras: mirror.tobias-wollmann.com
 * updates: mirror.netcologne.de
Package libjpeg-turbo-devel-1.2.90-5.el7.x86_64 already installed and latest version
Package 2:libpng-devel-1.5.13-7.el7_2.x86_64 already installed and latest version
Package freetype-devel-2.4.11-15.el7.x86_64 already installed and latest version
Package libXpm-devel-3.5.12-1.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-8.el7.x86_64 already installed and latest version
Package 12:aspell-devel-0.60.6.1-9.el7.x86_64 already installed and latest version
Package libtidy-devel-5.4.0-1.el7.x86_64 already installed and latest version
Package icu-50.1.2-15.el7.x86_64 already installed and latest version
Package libicu-50.1.2-15.el7.x86_64 already installed and latest version
Package libicu-devel-50.1.2-15.el7.x86_64 already installed and latest version
Nothing to do
/usr/local/src/php-rebuild.sh: line 73: ./configure: Permission denied
Configure DONE!
####################
make: *** No targets specified and no makefile found.  Stop.
Make DONE!
####################
make: *** No rule to make target `install'.  Stop.
Make Install DONE!
####################
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using server.foo.bar. Set the 'ServerName' directive globally to suppress this message
PHP Rebuild Completed
#########################

30cdf391560a14c8f1d3cb0bb2fe373d
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.netcologne.de
 * epel: mirror.23media.de
 * extras: mirror.tobias-wollmann.com
 * updates: mirror.netcologne.de
Package ImageMagick-6.7.8.9-15.el7_2.x86_64 already installed and latest version
Package ImageMagick-devel-6.7.8.9-15.el7_2.x86_64 already installed and latest version
Package ImageMagick-perl-6.7.8.9-15.el7_2.x86_64 already installed and latest version
Nothing to do
http://pecl.php.net/get/imagick-3.4.3.tgz
Resolving pecl.php.net (pecl.php.net)... 104.236.228.160
Connecting to pecl.php.net (pecl.php.net)|104.236.228.160|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 245410 (240K) [application/octet-stream]
Saving to: 'imagick-3.4.3.tgz'

     0K .......... .......... .......... .......... .......... 20%  283K 1s
    50K .......... .......... .......... .......... .......... 41%  567K 0s
   100K .......... .......... .......... .......... .......... 62% 21.2M 0s
   150K .......... .......... .......... .......... .......... 83% 40.9M 0s
   200K .......... .......... .......... .........            100%  463K=0.4s

2018-01-31 02:46:05 (677 KB/s) - 'imagick-3.4.3.tgz' saved [245410/245410]

Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
ln: failed to create symbolic link '/usr/local/include/ImageMagick': File exists
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking for pkg-config... /usr/bin/pkg-config
checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
checking Testing /usr/bin/MagickWand-config... It exists
found in /usr/bin/MagickWand-config
checking if ImageMagick version is at least 6.2.4... found version 6.7.8 Q16
checking for MagickWand.h or magick-wand.h header... /usr/include/ImageMagick/wand/MagickWand.h
checking PHP version is at least 5.1.3... yes. found 5.6.30
libs
-lMagickWand -lMagickCore


checking for MagickGetVersion... yes
checking for MagickSetImageInterpolateMethod... yes
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la       modules/* libs/*
/bin/sh /usr/local/src/imagick-3.4.3/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick   -I. -I/usr/local/src/imagick-3.4.3 -DPHP_ATOM_INC -I/usr/local/src/imagick-3.4.3/include -I/usr/local/src/imagick-3.4.3/main -I/usr/local/src/imagick-3.4.3 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/src/imagick-3.4.3/imagick_file.c -o imagick_file.lo
mkdir .libs

(cd .libs && rm -f imagick.la && ln -s ../imagick.la imagick.la)
/bin/sh /usr/local/src/imagick-3.4.3/libtool --mode=install cp ./imagick.la /usr/local/src/imagick-3.4.3/modules
cp ./.libs/imagick.so /usr/local/src/imagick-3.4.3/modules/imagick.so
cp ./.libs/imagick.lai /usr/local/src/imagick-3.4.3/modules/imagick.la
PATH="$PATH:/sbin" ldconfig -n /usr/local/src/imagick-3.4.3/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/src/imagick-3.4.3/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20131226/
Installing header files:           /usr/local/include/php/
« Last Edit: January 31, 2018, 03:07:06 AM by n8v8r »

Offline
****
Re: server switch to php7.1 failure
« Reply #3 on: January 31, 2018, 03:12:49 AM »
For PHP5.6.33 another broken pipe
Quote
zend-loader-php5.6-linux-x86_64/
  inflating: zend-loader-php5.6-linux-x86_64/ZendGuardLoader.so
'ZendGuardLoader.so' -> '/usr/local/zend/5.6/ZendGuardLoader.so'
yes: standard output: Broken pipe
yes: write error

And the same without Zend
Quote
/usr/local/src/php-rebuild.sh: line 73: ./configure: Permission denied
« Last Edit: January 31, 2018, 03:20:12 AM by n8v8r »

Offline
*****
Re: server switch to php7.1 failure
« Reply #4 on: January 31, 2018, 02:37:07 PM »
hello
can you run this command and share the output :

Code: [Select]
sestatus

Offline
****
Re: server switch to php7.1 failure
« Reply #5 on: January 31, 2018, 02:38:24 PM »
Quote
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          permissive
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

Offline
*****
Re: server switch to php7.1 failure
« Reply #6 on: January 31, 2018, 02:44:23 PM »
you need to disable selinux

edit this file /etc/sysconfig/selinux
find and edit this value to :
Code: [Select]
SELINUX=disabled
beware wrong editing can lead to server crash

save and reboot the server

and try to rebuild the php

Offline
****
Re: server switch to php7.1 failure
« Reply #7 on: January 31, 2018, 02:47:32 PM »
Could you please elaborate because it set to permissive and Policy deny_unknown status:     allowed, which does not actually block anything but writes into the log. hence there should not be any issues?

Offline
*****
Re: server switch to php7.1 failure
« Reply #8 on: January 31, 2018, 02:51:20 PM »
cwp doesn't supports selinux, this need to be disabled

Offline
****
Re: server switch to php7.1 failure
« Reply #9 on: January 31, 2018, 03:01:49 PM »
that is sidestepping the question, SEL is permissive and not blocking anything, so the script (php-rebuild.sh) should go through without harm unless it is checking whether SEL is enabled but not making a distinction between enforcing and permissive and aborting in any case.

And in any case there should be a dominant notice on php_switch_v2 about this, saving the CWP customer some grievance and CWP staff time/effort on the support.

How about mod_security, is that supported?
« Last Edit: January 31, 2018, 03:04:44 PM by n8v8r »

Offline
*****
Re: server switch to php7.1 failure
« Reply #10 on: January 31, 2018, 03:08:38 PM »
we don't have information about your questions since we didn't support it. CWP need to be run without selinux, when installing cwp it is disabled by default why you enabled that, if you really want to use it you need to check that and configure it accordingly.

Offline
****
Re: server switch to php7.1 failure
« Reply #11 on: January 31, 2018, 03:17:21 PM »
Right, CPW is not supporting SEL but putting it in the CWP setting sections even with an editor instead of either removing it from the settings altogether or at least making a clear statement about the CWP policy aboce the text editor window. Saves everybody's time and this sort of thread...



From your responses it seems obvious that the script is aborting the installation regardless of whether SEL is actually in permissive mode and thus the script being the culprit rather than SEL actually...

And you cannot answer the question about mod_security either   ??? :o

Offline
*****
Re: server switch to php7.1 failure
« Reply #12 on: January 31, 2018, 03:19:44 PM »
we didn't answer which are unrelated and being custom modified.