deb.sury.org icon indicating copy to clipboard operation
deb.sury.org copied to clipboard

phpinfo(); results in 500 Internal Server Error with lighttpd and php5.6-fpm 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4

Open ggaussling opened this issue 4 years ago • 7 comments

Hi,

I got a strange Issue with the php5.6-fpm. It stopped working on phpinfo(); and I can't figure out the culprit.

phpinfo(); results in "500 Internal Server Error" with lighttpd and php5.6-fpm 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4. In kern.log I only can see a segfault in kern.log.

kern.log (segfault) Aug 3 10:31:12 pv10 kernel: [480674.901086] php-fpm5.6[19848]: segfault at 70012fc7 ip 0000555841ee8180 sp 00007ffececa3450 error 4 in php-fpm5.6[555841e0b000+24b000] Aug 3 10:31:12 pv10 kernel: [480674.901095] Code: 31 db 45 8d 75 ff eb 70 66 90 89 c2 83 c0 08 48 03 55 10 89 45 00 48 8b 12 41 8b 84 24 08 01 00 00 48 85 d2 0f 84 97 00 00 00 <80> 3a 00 0f 84 8e 00 00 00 48 89 d7 85 c0 0f 85 f4 00 00 00 48 89

lighttpd error.log (response not received) `2020-08-03 10:31:12: (gw_backend.c.231) got proc: pid: 0 socket: tcp:172.16.240.44:9001 load: 1

2020-08-03 10:31:12: (http-header-glue.c.1250) read(): Connection reset by peer 29 30 2020-08-03 10:31:12: (gw_backend.c.2149) response not received, request sent: 907 on socket: tcp:172.16.240.44:9001 for /info.php?, closing connection 2020-08-03 10:31:12: (gw_backend.c.305) released proc: pid: 0 socket: tcp:172.16.240.44:9001 load: 0 2020-08-03 13:25:54: (gw_backend.c.931) gw - found a host 172.16.240.44 9001 2020-08-03 13:25:54: (gw_backend.c.231) got proc: pid: 0 socket: tcp:172.16.240.44:9001 load: 1 2020-08-03 13:25:55: (gw_backend.c.305) released proc: pid: 0 socket: tcp:172.16.240.44:9001 load: 0 2020-08-03 13:26:18: (gw_backend.c.931) gw - found a host 172.16.240.44 9001 2020-08-03 13:26:18: (gw_backend.c.231) got proc: pid: 0 socket: tcp:172.16.240.44:9001 load: 1 2020-08-03 13:26:18: (gw_backend.c.305) released proc: pid: 0 socket: tcp:172.16.240.44:9001 load: 0

pv10:~gallery3# Aug 3 10:31:12 pv10 kernel: [480674.901086] php-fpm5.6[19848]: segfault at 70012fc7 ip 000055584 1ee8180 sp 00007ffececa3450 error 4 in php-fpm5.6[555841e0b000+24b000]`

The bizarre is, that it once worked, and that e.g. gallery2.3.2 and gallery3.1.3 and other php/mariadb applications are working fine (but I cannot import gallery2.3.2 in gallery3.1.3, the reason why I installed php5.6 in the first place)

I already asked in the debianforum.de (german language, but logs are mostly in english) https://debianforum.de/forum/viewtopic.php?f=8&t=178175&p=1245591#p1245591

And the gallery3 google group (less relevant) https://groups.google.com/g/gallery-3-users/c/Y7w1iEVjXSI

Maybe I should use the dbg package? But then I need a hint, how to debug.

In case, this is not the place to discuss the issue: Where can I find the upstream issue tracker?

Thank you in advance

Gerhard

ggaussling avatar Aug 03 '20 12:08 ggaussling

It just came to my mind to issue phpinfo(); from CLI:

` pv10:~gallery3# php5.6 -f /home/gerhard/www/docs/gallery3/info.php

phpinfo(); ?>

pv10:~gallery3# php5.6 -F /home/gerhard/www/docs/gallery3/info.php pv10:~gallery3# php5.6 -a Interactive mode enabled

php > phpinfo(); Speicherzugriffsfehler pv10:~gallery3# php5.6 -i phpinfo() PHP Version => 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4

System => Linux pv10.ggserve.eu 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /etc/php/5.6/cli Loaded Configuration File => /etc/php/5.6/cli/php.ini Scan this dir for additional .ini files => /etc/php/5.6/cli/conf.d Additional .ini files parsed => /etc/php/5.6/cli/conf.d/10-mysqlnd.ini, /etc/php/5.6/cli/conf.d/10-opcache.ini, /etc/php/5.6/cli/conf.d/10-pdo.ini, /etc/php/5.6/cli/conf.d/15-xml.ini, /etc/php/5.6/cli/conf.d/20-calendar.ini, /etc/php/5.6/cli/conf.d/20-ctype.ini, /etc/php/5.6/cli/conf.d/20-dom.ini, /etc/php/5.6/cli/conf.d/20-exif.ini, /etc/php/5.6/cli/conf.d/20-fileinfo.ini, /etc/php/5.6/cli/conf.d/20-ftp.ini, /etc/php/5.6/cli/conf.d/20-gd.ini, /etc/php/5.6/cli/conf.d/20-gettext.ini, /etc/php/5.6/cli/conf.d/20-iconv.ini, /etc/php/5.6/cli/conf.d/20-json.ini, /etc/php/5.6/cli/conf.d/20-mbstring.ini, /etc/php/5.6/cli/conf.d/20-mysql.ini, /etc/php/5.6/cli/conf.d/20-mysqli.ini, /etc/php/5.6/cli/conf.d/20-pdo_mysql.ini, /etc/php/5.6/cli/conf.d/20-phar.ini, /etc/php/5.6/cli/conf.d/20-posix.ini, /etc/php/5.6/cli/conf.d/20-propro.ini, /etc/php/5.6/cli/conf.d/20-raphf.ini, /etc/php/5.6/cli/conf.d/20-readline.ini, /etc/php/5.6/cli/conf.d/20-shmop.ini, /etc/php/5.6/cli/conf.d/20-simplexml.ini, /etc/php/5.6/cli/conf.d/20-sockets.ini, /etc/php/5.6/cli/conf.d/20-sysvmsg.ini, /etc/php/5.6/cli/conf.d/20-sysvsem.ini, /etc/php/5.6/cli/conf.d/20-sysvshm.ini, /etc/php/5.6/cli/conf.d/20-tokenizer.ini, /etc/php/5.6/cli/conf.d/20-wddx.ini, /etc/php/5.6/cli/conf.d/20-xmlreader.ini, /etc/php/5.6/cli/conf.d/20-xmlrpc.ini, /etc/php/5.6/cli/conf.d/20-xmlwriter.ini, /etc/php/5.6/cli/conf.d/20-xsl.ini, /etc/php/5.6/cli/conf.d/25-http.ini

PHP API => 20131106 PHP Extension => 20131226 Zend Extension => 220131226 Zend Extension Build => API220131226,NTS PHP Extension Build => API20131226,NTS Debug Build => no Thread Safety => disabled Zend Signal Handling => disabled Zend Memory Manager => enabled Zend Multibyte Support => provided by mbstring IPv6 Support => enabled DTrace Support => enabled

Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2 Registered Stream Filters => zlib., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, convert.iconv., http.

This program makes use of the Zend Scripting Language Engine: Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies


Configuration

calendar

Calendar support => enabled

Core

PHP Version => 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4

Directive => Local Value => Master Value allow_url_fopen => On => On allow_url_include => Off => Off always_populate_raw_post_data => 0 => 0 arg_separator.input => & => & arg_separator.output => & => & asp_tags => Off => Off auto_append_file => no value => no value auto_globals_jit => On => On auto_prepend_file => no value => no value browscap => no value => no value default_charset => UTF-8 => UTF-8 default_mimetype => text/html => text/html disable_classes => no value => no value disable_functions => no value => no value display_errors => Off => Off display_startup_errors => Off => Off doc_root => no value => no value docref_ext => no value => no value docref_root => no value => no value enable_dl => Off => Off enable_post_data_reading => On => On error_append_string => no value => no value error_log => no value => no value error_prepend_string => no value => no value error_reporting => 22527 => 22527 exit_on_timeout => Off => Off expose_php => On => On extension_dir => /usr/lib/php/20131226 => /usr/lib/php/20131226 file_uploads => On => On highlight.comment => #FF8000 => #FF8000 highlight.default => #0000BB => #0000BB highlight.html => #000000 => #000000 highlight.keyword => #007700 => #007700 highlight.string => #DD0000 => #DD0000 html_errors => Off => Off ignore_repeated_errors => Off => Off ignore_repeated_source => Off => Off ignore_user_abort => Off => Off implicit_flush => On => On include_path => .:/usr/share/php => .:/usr/share/php input_encoding => no value => no value internal_encoding => no value => no value log_errors => On => On log_errors_max_len => 1024 => 1024 mail.add_x_header => On => On mail.force_extra_parameters => no value => no value mail.log => no value => no value max_execution_time => 0 => 0 max_file_uploads => 20 => 20 max_input_nesting_level => 64 => 64 max_input_time => -1 => -1 max_input_vars => 1000 => 1000 memory_limit => -1 => -1 open_basedir => no value => no value output_buffering => 0 => 0 output_encoding => no value => no value output_handler => no value => no value post_max_size => 8M => 8M precision => 14 => 14 realpath_cache_size => 16K => 16K realpath_cache_ttl => 120 => 120 register_argc_argv => On => On report_memleaks => On => On report_zend_debug => Off => Off request_order => GP => GP sendmail_from => no value => no value sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i serialize_precision => 17 => 17 short_open_tag => Off => Off SMTP => localhost => localhost smtp_port => 25 => 25 sql.safe_mode => Off => Off sys_temp_dir => no value => no value track_errors => Off => Off unserialize_callback_func => no value => no value upload_max_filesize => 2M => 2M upload_tmp_dir => no value => no value user_dir => no value => no value user_ini.cache_ttl => 300 => 300 user_ini.filename => .user.ini => .user.ini variables_order => GPCS => GPCS xmlrpc_error_number => 0 => 0 xmlrpc_errors => Off => Off zend.detect_unicode => On => On zend.enable_gc => On => On zend.multibyte => Off => Off zend.script_encoding => no value => no value

ctype

ctype functions => enabled

date

date/time support => enabled "Olson" Timezone Database Version => 0.system Timezone Database => internal Default timezone => Europe/Berlin

Directive => Local Value => Master Value date.default_latitude => 31.7667 => 31.7667 date.default_longitude => 35.2333 => 35.2333 date.sunrise_zenith => 90.583333 => 90.583333 date.sunset_zenith => 90.583333 => 90.583333 date.timezone => no value => no value

dom

DOM/XML => enabled DOM/XML API Version => 20031129 libxml Version => 2.9.9 HTML Support => enabled XPath Support => enabled XPointer Support => enabled Schema Support => enabled RelaxNG Support => enabled

ereg

Regex Library => Bundled library enabled

exif

EXIF Support => enabled EXIF Version => 1.4 $Id: cad29b729548e4206f0697710cc9e177f26fdff3 $ Supported EXIF Version => 0220 Supported filetypes => JPEG,TIFF

Directive => Local Value => Master Value exif.decode_jis_intel => JIS => JIS exif.decode_jis_motorola => JIS => JIS exif.decode_unicode_intel => UCS-2LE => UCS-2LE exif.decode_unicode_motorola => UCS-2BE => UCS-2BE exif.encode_jis => no value => no value exif.encode_unicode => ISO-8859-15 => ISO-8859-15

fileinfo

fileinfo support => enabled version => 1.0.5 libmagic => 517

filter

Input Validation and Filtering => enabled Revision => $Id: 5b79667bd9a68977a9b4f7505223a8e216e04908 $

Directive => Local Value => Master Value filter.default => unsafe_raw => unsafe_raw filter.default_flags => no value => no value

ftp

FTP support => enabled

gd

GD Support => enabled GD headers Version => 2.2.5 GD library Version => 2.2.5 FreeType Support => enabled FreeType Linkage => with freetype FreeType Version => 2.9.1 GIF Read Support => enabled GIF Create Support => enabled JPEG Support => enabled libJPEG Version => 6b PNG Support => enabled libPNG Version => 1.6.36 WBMP Support => enabled XPM Support => enabled libXpm Version => 30411 XBM Support => enabled WebP Support => enabled

Directive => Local Value => Master Value gd.jpeg_ignore_warning => 0 => 0

gettext

GetText Support => enabled

hash

hash support => enabled Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

http

HTTP Support => enabled Extension Version => 2.6.0

Used Library => Compiled => Linked libz => 1.2.11 => 1.2.11 libcurl => disabled => disabled libevent => Speicherzugriffsfehler pv10:~gallery3# `

Speicherzugriffsfehler == segfault

So the culprit is in libevent? Or is it only involved, because the php-fpm didn't send an answer on the request, and libevent notifies on that lack of response?

ggaussling avatar Aug 03 '20 12:08 ggaussling

It seems, I found a relevant bug report on a similar issue, but with php5.4.41 on CentOS 7 x64 in pecl_http.

Bug #69764 | Seg Fault on phpinfo() 2015-06-06 14:06 UTC https://bugs.php.net/bug.php?id=69764

[2016-01-05 05:26 UTC] jsnell-php at e-normous dot com Removing libevent-dev or installing libcurl4-openssl-dev in debian makes the segmentation fault go away

I installed libcurl4-openssl-dev, but the error didn't go away. But removing php-http works! After removing 500 Internal Server Error disappeared and the phpinfo page showed up, as expected.

` apt policy php-http

php-http: Installiert: 3.2.3+2.6.0-1+0~20191219.9+debian10~1.gbp0450a1 Installationskandidat: 3.2.3+2.6.0-1+0~20191219.9+debian10~1.gbp0450a1 Versionstabelle: *** 3.2.3+2.6.0-1+0~20191219.9+debian10~1.gbp0450a1 500 500 https://packages.sury.org/php buster/main amd64 Packages 100 /var/lib/dpkg/status 3.2.0+2.6.0-2+b1 500 500 http://deb.debian.org/debian buster/main amd64 Packages`

` ldd /usr/lib/php/20131226/http.so

    linux-vdso.so.1 (0x00007ffe9d974000)
    libevent-2.1.so.6 => /usr/lib/x86_64-linux-gnu/libevent-2.1.so.6 (0x00007fa4d893c000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa4d871e000)
    libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fa4d86fe000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa4d853d000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa4d851c000)
    libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fa4d8398000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fa4d8c0f000)

apt search libcurl4-openssl Sortierung... Fertig Volltextsuche... Fertig libcurl4-openssl-dev/stable,stable 7.64.0-4+deb10u1 amd64 Entwicklungsdateien und Dokumentation für libcurl (OpenSSL-Variante)`

` apt-file search libevent-2.1.so.6

libevent-2.1-6: /usr/lib/x86_64-linux-gnu/libevent-2.1.so.6`

I don't know exactly where to file the bug? php5.6-40, libevent-2.1-6, or php-http (aka pecl_http)?

I also found this bug: https://github.com/oerdnj/deb.sury.org/issues/741

ggaussling avatar Aug 03 '20 21:08 ggaussling

I tried a debug session. I'm not sure, if that is invoked well.

pv10:~gallery3# LANG=EN gdb php5.6 GNU gdb (Debian 8.2.1-2+b3) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from php5.6...Reading symbols from /usr/lib/debug/.build-id/cd/2fbcc42ccdfbd6b666f123c03335d4866584d9.debug...done. done. (gdb) run -i Starting program: /usr/bin/php5.6 -i [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". phpinfo() PHP Version => 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4

System => Linux pv10.gaussling.selfhost.eu 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /etc/php/5.6/cli Loaded Configuration File => /etc/php/5.6/cli/php.ini Scan this dir for additional .ini files => /etc/php/5.6/cli/conf.d Additional .ini files parsed => /etc/php/5.6/cli/conf.d/10-mysqlnd.ini, /etc/php/5.6/cli/conf.d/10-opcache.ini, /etc/php/5.6/cli/conf.d/10-pdo.ini, /etc/php/5.6/cli/conf.d/15-xml.ini, /etc/php/5.6/cli/conf.d/20-calendar.ini, /etc/php/5.6/cli/conf.d/20-ctype.ini, /etc/php/5.6/cli/conf.d/20-dom.ini, /etc/php/5.6/cli/conf.d/20-exif.ini, /etc/php/5.6/cli/conf.d/20-fileinfo.ini, /etc/php/5.6/cli/conf.d/20-ftp.ini, /etc/php/5.6/cli/conf.d/20-gd.ini, /etc/php/5.6/cli/conf.d/20-gettext.ini, /etc/php/5.6/cli/conf.d/20-iconv.ini, /etc/php/5.6/cli/conf.d/20-json.ini, /etc/php/5.6/cli/conf.d/20-mbstring.ini, /etc/php/5.6/cli/conf.d/20-mysql.ini, /etc/php/5.6/cli/conf.d/20-mysqli.ini, /etc/php/5.6/cli/conf.d/20-pdo_mysql.ini, /etc/php/5.6/cli/conf.d/20-phar.ini, /etc/php/5.6/cli/conf.d/20-posix.ini, /etc/php/5.6/cli/conf.d/20-propro.ini, /etc/php/5.6/cli/conf.d/20-raphf.ini, /etc/php/5.6/cli/conf.d/20-readline.ini, /etc/php/5.6/cli/conf.d/20-shmop.ini, /etc/php/5.6/cli/conf.d/20-simplexml.ini, /etc/php/5.6/cli/conf.d/20-sockets.ini, /etc/php/5.6/cli/conf.d/20-sysvmsg.ini, /etc/php/5.6/cli/conf.d/20-sysvsem.ini, /etc/php/5.6/cli/conf.d/20-sysvshm.ini, /etc/php/5.6/cli/conf.d/20-tokenizer.ini, /etc/php/5.6/cli/conf.d/20-wddx.ini, /etc/php/5.6/cli/conf.d/20-xmlreader.ini, /etc/php/5.6/cli/conf.d/20-xmlrpc.ini, /etc/php/5.6/cli/conf.d/20-xmlwriter.ini, /etc/php/5.6/cli/conf.d/20-xsl.ini, /etc/php/5.6/cli/conf.d/25-http.ini

PHP API => 20131106 PHP Extension => 20131226 Zend Extension => 220131226 Zend Extension Build => API220131226,NTS PHP Extension Build => API20131226,NTS Debug Build => no Thread Safety => disabled Zend Signal Handling => disabled Zend Memory Manager => enabled Zend Multibyte Support => provided by mbstring IPv6 Support => enabled DTrace Support => enabled

Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2 Registered Stream Filters => zlib., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, convert.iconv., http.

This program makes use of the Zend Scripting Language Engine: Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies


Configuration

calendar

Calendar support => enabled

Core

PHP Version => 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4

Directive => Local Value => Master Value allow_url_fopen => On => On allow_url_include => Off => Off always_populate_raw_post_data => 0 => 0 arg_separator.input => & => & arg_separator.output => & => & asp_tags => Off => Off auto_append_file => no value => no value auto_globals_jit => On => On auto_prepend_file => no value => no value browscap => no value => no value default_charset => UTF-8 => UTF-8 default_mimetype => text/html => text/html disable_classes => no value => no value disable_functions => no value => no value display_errors => Off => Off display_startup_errors => Off => Off doc_root => no value => no value docref_ext => no value => no value docref_root => no value => no value enable_dl => Off => Off enable_post_data_reading => On => On error_append_string => no value => no value error_log => no value => no value error_prepend_string => no value => no value error_reporting => 22527 => 22527 exit_on_timeout => Off => Off expose_php => On => On extension_dir => /usr/lib/php/20131226 => /usr/lib/php/20131226 file_uploads => On => On highlight.comment => #FF8000 => #FF8000 highlight.default => #0000BB => #0000BB highlight.html => #000000 => #000000 highlight.keyword => #007700 => #007700 highlight.string => #DD0000 => #DD0000 html_errors => Off => Off ignore_repeated_errors => Off => Off ignore_repeated_source => Off => Off ignore_user_abort => Off => Off implicit_flush => On => On include_path => .:/usr/share/php => .:/usr/share/php input_encoding => no value => no value internal_encoding => no value => no value log_errors => On => On log_errors_max_len => 1024 => 1024 mail.add_x_header => On => On mail.force_extra_parameters => no value => no value mail.log => no value => no value max_execution_time => 0 => 0 max_file_uploads => 20 => 20 max_input_nesting_level => 64 => 64 max_input_time => -1 => -1 max_input_vars => 1000 => 1000 memory_limit => -1 => -1 open_basedir => no value => no value output_buffering => 0 => 0 output_encoding => no value => no value output_handler => no value => no value post_max_size => 8M => 8M precision => 14 => 14 realpath_cache_size => 16K => 16K realpath_cache_ttl => 120 => 120 register_argc_argv => On => On report_memleaks => On => On report_zend_debug => Off => Off request_order => GP => GP sendmail_from => no value => no value sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i serialize_precision => 17 => 17 short_open_tag => Off => Off SMTP => localhost => localhost smtp_port => 25 => 25 sql.safe_mode => Off => Off sys_temp_dir => no value => no value track_errors => Off => Off unserialize_callback_func => no value => no value upload_max_filesize => 2M => 2M upload_tmp_dir => no value => no value user_dir => no value => no value user_ini.cache_ttl => 300 => 300 user_ini.filename => .user.ini => .user.ini variables_order => GPCS => GPCS xmlrpc_error_number => 0 => 0 xmlrpc_errors => Off => Off zend.detect_unicode => On => On zend.enable_gc => On => On zend.multibyte => Off => Off zend.script_encoding => no value => no value

ctype

ctype functions => enabled

date

date/time support => enabled "Olson" Timezone Database Version => 0.system Timezone Database => internal Default timezone => Europe/Berlin

Directive => Local Value => Master Value date.default_latitude => 31.7667 => 31.7667 date.default_longitude => 35.2333 => 35.2333 date.sunrise_zenith => 90.583333 => 90.583333 date.sunset_zenith => 90.583333 => 90.583333 date.timezone => no value => no value

dom

DOM/XML => enabled DOM/XML API Version => 20031129 libxml Version => 2.9.9 HTML Support => enabled XPath Support => enabled XPointer Support => enabled Schema Support => enabled RelaxNG Support => enabled

ereg

Regex Library => Bundled library enabled

exif

EXIF Support => enabled EXIF Version => 1.4 $Id: cad29b729548e4206f0697710cc9e177f26fdff3 $ Supported EXIF Version => 0220 Supported filetypes => JPEG,TIFF

Directive => Local Value => Master Value exif.decode_jis_intel => JIS => JIS exif.decode_jis_motorola => JIS => JIS exif.decode_unicode_intel => UCS-2LE => UCS-2LE exif.decode_unicode_motorola => UCS-2BE => UCS-2BE exif.encode_jis => no value => no value exif.encode_unicode => ISO-8859-15 => ISO-8859-15

fileinfo

fileinfo support => enabled version => 1.0.5 libmagic => 517

filter

Input Validation and Filtering => enabled Revision => $Id: 5b79667bd9a68977a9b4f7505223a8e216e04908 $

Directive => Local Value => Master Value filter.default => unsafe_raw => unsafe_raw filter.default_flags => no value => no value

ftp

FTP support => enabled

gd

GD Support => enabled GD headers Version => 2.2.5 GD library Version => 2.2.5 FreeType Support => enabled FreeType Linkage => with freetype FreeType Version => 2.9.1 GIF Read Support => enabled GIF Create Support => enabled JPEG Support => enabled libJPEG Version => 6b PNG Support => enabled libPNG Version => 1.6.36 WBMP Support => enabled XPM Support => enabled libXpm Version => 30411 XBM Support => enabled WebP Support => enabled

Directive => Local Value => Master Value gd.jpeg_ignore_warning => 0 => 0

gettext

GetText Support => enabled

hash

hash support => enabled Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

http

HTTP Support => enabled Extension Version => 2.6.0

Used Library => Compiled => Linked libz => 1.2.11 => 1.2.11 libcurl => disabled => disabled libevent => Program received signal SIGSEGV, Segmentation fault. 0x0000555555704700 in php_info_print_table_row_internal (num_cols=3, value_class=value_class@entry=0x555555894b85 "v", row_elements=row_elements@entry=0x7fffffffcbf0) at ./ext/standard/info.c:1297 1297 ./ext/standard/info.c: No such file or directory. (gdb) run -i phpinfo(); The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/bin/php5.6 -i phpinfo(); /bin/bash: -c: line 0: syntax error near unexpected token (' /bin/bash: -c: line 0: exec /usr/bin/php5.6 -i phpinfo();' During startup program exited with code 1. (gdb)

I think info.c is lacking during compilation? I'm sorry. I can't read

pv10:~gallery3# LANG=EN gdb php5.6 GNU gdb (Debian 8.2.1-2+b3) 8.2.1 [...]

[...] Reading symbols from php5.6...Reading symbols from /usr/lib/debug/.build-id/cd/2fbcc42ccdfbd6b666f123c03335d4866584d9.debug...done. done. (gdb) run -i Starting program: /usr/bin/php5.6 -i [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". phpinfo() PHP Version => 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 [...] http

HTTP Support => enabled Extension Version => 2.6.0

Used Library => Compiled => Linked libz => 1.2.11 => 1.2.11 libcurl => disabled => disabled libevent => Program received signal SIGSEGV, Segmentation fault. 0x0000555555704700 in php_info_print_table_row_internal (num_cols=3, value_class=value_class@entry=0x555555894b85 "v", row_elements=row_elements@entry=0x7fffffffcbf0) at ./ext/standard/info.c:1297 1297 ./ext/standard/info.c: No such file or directory. (gdb)

pv10:~gallery3# apt-file search info.c |egrep 'php|libevent|http' apache2-doc: /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-info.conf apache2-doc: /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-info.conf libquvi-0.9-doc: /usr/share/doc/libquvi-0.9-doc/examples/http_metainfo.c php-getid3: /usr/share/doc/php-getid3/examples/demo.audioinfo.class.php

https://github.com/php/php-src/blob/PHP-5.6.40/ext/standard/info.c `static void php_info_print_table_row_internal(int num_cols, const char *value_class, va_list row_elements) { int i; char *row_element;

if (!sapi_module.phpinfo_as_text) {
	php_info_print("<tr>");
}
for (i=0; i<num_cols; i++) {
	if (!sapi_module.phpinfo_as_text) {
		php_info_printf("<td class=\"%s\">",
		   (i==0 ? "e" : value_class )
		);
	}
	row_element = va_arg(row_elements, char *);
	if (!row_element || !*row_element) {
		if (!sapi_module.phpinfo_as_text) {
			php_info_print( "<i>no value</i>" );
		} else {
			php_info_print( " " );
		}
	} else {
		if (!sapi_module.phpinfo_as_text) {
			php_info_print_html_esc(row_element, strlen(row_element));
		} else {
			php_info_print(row_element);
			if (i < num_cols-1) {
				php_info_print(" => ");
			}
		}
	}
	if (!sapi_module.phpinfo_as_text) {
		php_info_print(" </td>");
	} else if (i == (num_cols - 1)) {
		php_info_print("\n");
	}
}
if (!sapi_module.phpinfo_as_text) {
	php_info_print("</tr>\n");
}

}`

The backticks aren't working very well for code blocks.

Lines 1296-1297 are php_info_printf("<td class=\"%s\">", (i==0 ? "e" : value_class )

So line 1297 is (i==0 ? "e" : value_class )

Even if I install php5.6-dev, gdb output gives "1297 ./ext/standard/info.c: No such file or directory."

ggaussling avatar Aug 04 '20 08:08 ggaussling

I would start with disabling all extensions and enabling them one-by-one (or disabling them one-by-one).

oerdnj avatar Aug 04 '20 11:08 oerdnj

I can reproduce the issue, but I am not sure if this can be fixed. There are couple thing that you can do. a) for the love of the god stop using PHP 5.6 (use https://galleryrevival.com for Gallery 3 compatibility with PHP 7) b) uninstall php-pecl-http c) disable php-pecl-http just for the gallery 3 - using different FPM pool should help

oerdnj avatar Aug 04 '20 12:08 oerdnj

Thank you very much for replying, oerdnj!

Okay, when this cannot be resolved, I think I will go with c) I need 5.6 only for importing an old outdated gallery2 instance in gallery3. I'm using a virtualhost, not reachable by the internet for this task (due to php5.6-40 and gallery2 maybe isn't as secure as gallery3 on php7.x).

ggaussling avatar Aug 04 '20 16:08 ggaussling

as i post in https://github.com/oerdnj/deb.sury.org/issues/1506 i unninstall any php-pecl sury package and it works.. the bug is only in sury package.. cos from debian it works flameless, so in my case remove php5.6-http php7.4-http php7.3-http php7.2-http php-7.1-http php-http and works.. is a sury package that has the bug not the php-pecl-http as it said

vegnuli avatar Dec 15 '20 14:12 vegnuli