ich nutze php5.6 von sury.org für buster parallel zu php7.3 mit lighttpd um gallery2 nach gallery3 zu migrieren.
https://packages.sury.org/php buster
Code: Alles auswählen
# apt policy php5.6-fpm
php5.6-fpm:
Installiert: 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
Installationskandidat: 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
Versionstabelle:
*** 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 500
500 https://packages.sury.org/php buster/main amd64 Packages
100 /var/lib/dpkg/status
Code: Alles auswählen
# -*- depends: fastcgi -*-
# /usr/share/doc/lighttpd/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi
## Start an FastCGI server for php (needs the php5-cgi package)
## https://www.howtoforge.de/anleitung/wie-man-lighttpd-mit-php-mariadb-und-lets-encrypt-ssl-auf-debian-10-installiert/
## https://debianforum.de/forum/viewtopic.php?f=8&t=177737
fastcgi.server += ( ".php" =>
((
## -> entweder Socket oder host/port! (2020-07-28 14:05:43: (gw_backend.c.1346) either host/port or socket have to be set in: fastcgi.server = ( .php => ( 0 ( ...)
"host" => "127.0.0.1",
"port" => "9000",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
# https://serverfault.com/questions/984582/how-to-install-php-5-on-debian-10
$SERVER["socket"] == ":81" {
fastcgi.server = ( ".php" =>
((
"host" => "127.0.0.1",
"port" => "9001",
"max-procs" => 3,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "6",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
}
Code: Alles auswählen
# egrep -v '^;|^ *$' /etc/php/5.6/fpm/pool.d/www.conf
[www]
user = www-data
group = www-data
listen = 127.0.0.1:9001
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
# egrep -v '^;|^ *$' /etc/php/5.6/fpm/php.ini
[PHP]
engine = On
short_open_tag = On
asp_tags = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
disable_classes =
zend.enable_gc = On
expose_php = Off
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[CLI Server]
cli_server.color = On
[Date]
[filter]
[iconv]
[intl]
[sqlite3]
sqlite3.defensive = 1
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQL]
mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 0
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatibility_mode = Off
mssql.secure_connection = Off
[Assertion]
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[mcrypt]
[dba]
[opcache]
[curl]
[openssl]
Im kern.log findet sich dann ein segfault:
Code: Alles auswählen
Jul 30 18:48:16 pv10 kernel: [164908.130352] php-fpm5.6[11014]: segfault at a3ed0fc7 ip 000055b680319180 sp 00007fff551cab10 error 4 in php-fpm5.6[55b68023c000+24b000]
Jul 30 18:48:16 pv10 kernel: [164908.130362] 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
Code: Alles auswählen
# journalctl -xe -u php5.6-fpm
-- Support: https://www.debian.org/support
--
-- A start job for unit php5.6-fpm.service has begun execution.
--
-- The job identifier is 11645.
Jul 30 14:47:52 pv10.server.local systemd[1]: Started The PHP 5.6 FastCGI Process Manager.
-- Subject: A start job for unit php5.6-fpm.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit php5.6-fpm.service has finished successfully.
--
-- The job identifier is 11645.
Jul 30 15:00:42 pv10.server.local systemd[1]: Stopping The PHP 5.6 FastCGI Process Manager...
-- Subject: A stop job for unit php5.6-fpm.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit php5.6-fpm.service has begun execution.
--
-- The job identifier is 11766.
Jul 30 15:00:42 pv10.server.local systemd[1]: php5.6-fpm.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit php5.6-fpm.service has successfully entered the 'dead' state.
Jul 30 15:00:42 pv10.server.local systemd[1]: Stopped The PHP 5.6 FastCGI Process Manager.
-- Subject: A stop job for unit php5.6-fpm.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit php5.6-fpm.service has finished.
--
-- The job identifier is 11766 and the job result is done.
Jul 30 15:00:42 pv10.server.local systemd[1]: Starting The PHP 5.6 FastCGI Process Manager...
-- Subject: A start job for unit php5.6-fpm.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit php5.6-fpm.service has begun execution.
--
-- The job identifier is 11766.
Jul 30 15:00:42 pv10.server.local systemd[1]: Started The PHP 5.6 FastCGI Process Manager.
-- Subject: A start job for unit php5.6-fpm.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit php5.6-fpm.service has finished successfully.
--
-- The job identifier is 11766.
lines 293-343/343 (END)
Code: Alles auswählen
172.16.240.37 g2.server.eu:81 - [30/Jul/2020:18:48:16 +0200] "GET /info.php HTTP/1.1" 500 365 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0"
Code: Alles auswählen
2020-07-28 21:00:09: (server.c.1464) server started (lighttpd/1.4.53)
2020-07-29 00:20:45: (server.c.2059) server stopped by UID = 0 PID = 1
Code: Alles auswählen
[30-Jul-2020 14:47:52] NOTICE: fpm is running, pid 6294
[30-Jul-2020 14:47:52] NOTICE: ready to handle connections
[30-Jul-2020 14:47:52] NOTICE: systemd monitor interval set to 10000ms
[30-Jul-2020 14:47:56] WARNING: [pool www] child 6296 exited on signal 11 (SIGSEGV) after 3.092354 seconds from start
[30-Jul-2020 14:47:56] NOTICE: [pool www] child 6299 started
[30-Jul-2020 15:00:42] NOTICE: Terminating ...
[30-Jul-2020 15:00:42] NOTICE: exiting, bye-bye!
[30-Jul-2020 15:00:42] NOTICE: fpm is running, pid 11009
[30-Jul-2020 15:00:42] NOTICE: ready to handle connections
[30-Jul-2020 15:00:42] NOTICE: systemd monitor interval set to 10000ms
[30-Jul-2020 15:00:48] WARNING: [pool www] child 11011 exited on signal 11 (SIGSEGV) after 5.599059 seconds from start
[30-Jul-2020 15:00:48] NOTICE: [pool www] child 11014 started
Code: Alles auswählen
# grep -n php5.6-fpm /var/log/dpkg.log
954:2020-07-28 15:56:11 install php5.6-fpm:amd64 <none> 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
955:2020-07-28 15:56:11 status half-installed php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
957:2020-07-28 15:56:12 status unpacked php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
979:2020-07-28 15:56:40 configure php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 <none>
980:2020-07-28 15:56:40 status unpacked php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
981:2020-07-28 15:56:40 status half-configured php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
982:2020-07-28 15:56:45 status installed php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
994:2020-07-28 16:15:37 status triggers-pending php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1002:2020-07-28 16:15:45 trigproc php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 <none>
1003:2020-07-28 16:15:45 status half-configured php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1004:2020-07-28 16:15:46 status installed php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1007:2020-07-28 16:28:58 status triggers-pending php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1015:2020-07-28 16:29:00 trigproc php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 <none>
1016:2020-07-28 16:29:00 status half-configured php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1017:2020-07-28 16:29:01 status installed php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1318:2020-07-28 18:46:52 status triggers-pending php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1507:2020-07-28 18:51:03 trigproc php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 <none>
1508:2020-07-28 18:51:03 status half-configured php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1509:2020-07-28 18:51:04 status installed php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1690:2020-07-30 14:32:36 status triggers-pending php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1703:2020-07-30 14:32:39 trigproc php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 <keine>
1704:2020-07-30 14:32:39 status half-configured php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
1705:2020-07-30 14:32:40 status installed php5.6-fpm:amd64 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
# grep -n php5.6-fpm /var/log/dpkg.log
dpkg.log dpkg.log.10.gz dpkg.log.12.gz dpkg.log.3.gz dpkg.log.5.gz dpkg.log.7.gz dpkg.log.9.gz
dpkg.log.1 dpkg.log.11.gz dpkg.log.2.gz dpkg.log.4.gz dpkg.log.6.gz dpkg.log.8.gz
# grep -n php5.6-fpm /var/log/dpkg.log.1
# zgrep -n php5.6-fpm /var/log/dpkg.log.2.gz
# zgrep -n php5.6-fpm /var/log/dpkg.log.3.gz
# zgrep -n php5.6-fpm /var/log/dpkg.log.4.gz
# zgrep -n php5.6-fpm /var/log/dpkg.log.5.gz
# zgrep -n php5.6-fpm /var/log/dpkg.log.6.gz
# zgrep -n php5.6-fpm /var/log/dpkg.log.7.gz
# zgrep -n php5.6-fpm /var/log/dpkg.log.8.gz
# zgrep -n php5.6-fpm /var/log/dpkg.log.9.gz
#
Code: Alles auswählen
# systemctl status php5.6-fpm
* php5.6-fpm.service - The PHP 5.6 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php5.6-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-07-30 15:00:42 CEST; 4h 38min ago
Docs: man:php-fpm5.6(8)
Process: 11012 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/5.6/fpm/pool.d/www.conf 56 (code=exited, status=0/SUCCESS)
Main PID: 11009 (php-fpm5.6)
Status: "Processes active: 0, idle: 2, Requests: 5, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 2359)
Memory: 12.5M
CGroup: /system.slice/php5.6-fpm.service
|- 308 php-fpm: pool www
|- 1732 php-fpm: pool www
`-11009 php-fpm: master process (/etc/php/5.6/fpm/php-fpm.conf)
Jul 30 15:00:42 pv10.server.eu systemd[1]: Starting The PHP 5.6 FastCGI Process Manager...
Jul 30 15:00:42 pv10.server.eu systemd[1]: Started The PHP 5.6 FastCGI Process Manager.
Code: Alles auswählen
~# nmap localhost
Starting Nmap 7.70 ( https://nmap.org ) at 2020-07-30 19:43 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000014s latency).
Other addresses for localhost (not scanned): 172.16.240.44
Not shown: 991 closed ports
PORT STATE SERVICE
80/tcp open http
81/tcp open hosts2-ns
465/tcp open smtps
993/tcp open imaps
995/tcp open pop3s
3306/tcp open mysql
8080/tcp open http-proxy
9000/tcp open cslistener
9001/tcp open tor-orport
Nmap done: 1 IP address (1 host up) scanned in 1.75 seconds
~# netstat -tlnp | grep 900
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 318/php-fpm: master
tcp 0 0 127.0.0.1:9001 0.0.0.0:* LISTEN 308/php-fpm: pool w
~# ps axuf | grep fpm
root 6492 0.0 0.0 7352 2036 pts/0 S+ 19:45 0:00 | \_ grep fpm
root 11009 0.0 1.3 163912 26760 ? Ss 15:00 0:00 php-fpm: master process (/etc/php/5.6/fpm/php-fpm.conf)
www-data 308 0.0 0.2 163912 5508 ? S 19:26 0:00 \_ php-fpm: pool www
www-data 1732 0.0 0.2 163912 5508 ? S 19:31 0:00 \_ php-fpm: pool www
root 318 0.0 1.4 236080 30472 ? Ss 19:28 0:00 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
www-data 319 0.0 0.8 236236 17828 ? S 19:28 0:00 \_ php-fpm: pool www
www-data 322 0.0 0.4 236080 9184 ? S 19:28 0:00 \_ php-fpm: pool www