added extra/php-legacy

This commit is contained in:
Kevin Mihelich 2023-01-14 19:37:24 +00:00
parent ac131cea7e
commit 70e8975647
10 changed files with 737 additions and 0 deletions

333
extra/php-legacy/PKGBUILD Normal file
View file

@ -0,0 +1,333 @@
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - add -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to CPPFLAGS
pkgbase=php-legacy
pkgname=('php-legacy'
'php-legacy-cgi'
'php-legacy-apache'
'php-legacy-fpm'
'php-legacy-embed'
'php-legacy-phpdbg'
'php-legacy-dblib'
'php-legacy-enchant'
'php-legacy-gd'
'php-legacy-sodium'
'php-legacy-odbc'
'php-legacy-pgsql'
'php-legacy-pspell'
'php-legacy-snmp'
'php-legacy-sqlite'
'php-legacy-tidy'
'php-legacy-xsl')
pkgver=8.1.14
pkgrel=1.1
arch=('x86_64')
license=('PHP')
url='https://www.php.net/'
makedepends=('apache' 'aspell' 'gdbm' 'enchant' 'gd' 'gmp' 'icu' 'libsodium' 'libxslt' 'libzip' 'net-snmp'
'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl' 'libtool' 'postfix' 'freetds' 'pcre2' 'libnsl'
'oniguruma')
checkdepends=('procps-ng')
options=('debug')
source=("https://php.net/distributions/php-${pkgver}.tar.xz"{,.asc}
'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch' 'php-legacy.patch')
sha256sums=('e16e47a872d58685913ac848ce92ec49f42c1828110c98c65fb6265a08724a1a'
'SKIP'
'702b163c66c65af92dcad8d79f41bda84bcd5d863235fcf1497c33a86db9e4ca'
'2173046ac22ac50c7a6721306d3f79b2086f66a7a6ff5d8af249a474763197a1'
'632aaa2e87f7d687b0b55a6a89e473d57891fdb0d20eef1b7733dabc02b78ba8'
'f3236ca866095d5e42e51e3fa600082ccd0afcfb7f1aecbeb286ef9d4f0dd564'
'0d651c14cbd76bf430cd9b0c3b3ebf12fd19bf3ca4a18cb6dc329e0352aabe66'
'a1859005c9fad835079470e6fb3c0721b9bd024c8f3ae1f34cb082ec41c63194')
validpgpkeys=('F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD'
'39B641343D8C104B2B146DC3F9C39DC0B9698544')
_interpreter=${pkgver%.*}
prepare() {
cd "${srcdir}/php-${pkgver}"
patch -p0 -i "${srcdir}/apache.patch"
patch -p0 -i "${srcdir}/php-fpm.patch"
patch -p0 -i "${srcdir}/php.ini.patch"
patch -p0 -i "${srcdir}/php-legacy.patch"
autoconf
# Disable failing tests
rm tests/output/stream_isatty_*.phpt
rm Zend/tests/arginfo_zpp_mismatch*.phpt
}
build() {
CPPFLAGS+=' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
local _phpconfig="--srcdir=../php-${pkgver} \
--config-cache \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc/php-legacy \
--localstatedir=/var \
--with-layout=GNU \
--with-config-file-path=/etc/php-legacy \
--with-config-file-scan-dir=/etc/php-legacy/conf.d \
--disable-rpath \
--mandir=/usr/share/man \
--libdir=/usr/lib/php-legacy \
--datarootdir=/usr/share/php-legacy \
--datadir=/usr/share/php-legacy \
--program-suffix=-legacy \
--includedir=/usr/include/php-legacy \
--disable-gcc-global-regs \
"
local _phpextensions="\
--enable-bcmath=shared \
--enable-calendar=shared \
--enable-dba=shared \
--enable-exif=shared \
--enable-ftp=shared \
--enable-gd=shared \
--enable-intl=shared \
--enable-mbstring \
--enable-pcntl \
--enable-shmop=shared \
--enable-soap=shared \
--enable-sockets=shared \
--enable-sysvmsg=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--with-bz2=shared \
--with-curl=shared \
--with-enchant=shared \
--with-external-gd \
--with-external-pcre \
--with-ffi=shared \
--with-gdbm \
--with-gettext=shared \
--with-gmp=shared \
--with-iconv=shared \
--with-kerberos \
--with-ldap=shared \
--with-ldap-sasl \
--with-mhash \
--with-mysql-sock=/run/mysqld/mysqld.sock \
--with-mysqli=shared,mysqlnd \
--with-openssl \
--with-password-argon2 \
--with-pdo-dblib=shared,/usr \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-odbc=shared,unixODBC,/usr \
--with-pdo-pgsql=shared \
--with-pdo-sqlite=shared \
--with-pgsql=shared \
--with-pspell=shared \
--with-readline \
--with-snmp=shared \
--with-sodium=shared \
--with-sqlite3=shared \
--with-tidy=shared \
--with-unixODBC=shared \
--with-xsl=shared \
--with-zip=shared \
--with-zlib \
"
EXTENSION_DIR=/usr/lib/php-legacy/modules
export EXTENSION_DIR
mkdir "${srcdir}/build"
cd "${srcdir}/build"
ln -s "../php-${pkgver}/configure"
./configure ${_phpconfig} \
--enable-cgi \
--enable-fpm \
--with-fpm-systemd \
--with-fpm-acl \
--with-fpm-user=http \
--with-fpm-group=http \
--enable-embed=shared \
${_phpextensions}
make
# apache
# reuse the previous run; this will save us a lot of time
cp -a "${srcdir}/build" "${srcdir}/build-apache"
cd "${srcdir}/build-apache"
./configure ${_phpconfig} \
--with-apxs2 \
${_phpextensions}
make
# phpdbg
cp -a "${srcdir}/build" "${srcdir}/build-phpdbg"
cd "${srcdir}/build-phpdbg"
./configure ${_phpconfig} \
--enable-phpdbg \
${_phpextensions}
make
}
check() {
cd "${srcdir}/build"
# Check if sendmail was configured correctly (FS#47600)
sapi/cli/php -n -r 'echo ini_get("sendmail_path");' | grep -q '/usr/bin/sendmail'
export REPORT_EXIT_STATUS=1
export NO_INTERACTION=1
export SKIP_ONLINE_TESTS=1
export SKIP_SLOW_TESTS=1
export TEST_PHP_ARGS="-j$(nproc)"
export TESTS='tests Zend'
make test
}
package_php-legacy() {
pkgdesc='A general-purpose scripting language that is especially suited to web development'
depends=('libxml2' 'curl' 'libzip' 'pcre2' 'argon2' 'oniguruma' 'gdbm')
provides=("php-interpreter=${_interpreter}" "php-legacy-intl=${pkgver}")
replaces=('php-legacy-intl')
conflicts=('php-legacy-intl')
backup=('etc/php-legacy/php.ini')
cd "${srcdir}/build"
make -j1 INSTALL_ROOT="${pkgdir}" install-{modules,cli,build,headers,programs,pharcmd}
install -D -m644 "${srcdir}/php-${pkgver}/php.ini-production" "${pkgdir}/etc/php-legacy/php.ini"
install -d -m755 "${pkgdir}/etc/php-legacy/conf.d/"
# remove static modules
rm -f "${pkgdir}/usr/lib/php-legacy/modules/"*.a
# remove modules provided by sub packages
rm -f "${pkgdir}/usr/lib/php-legacy/modules/"{enchant,gd,sodium,odbc,pdo_dblib,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
# remove empty directory
rmdir "${pkgdir}/usr/include/php-legacy/php/include"
}
package_php-legacy-cgi() {
pkgdesc='CGI and FCGI SAPI for PHP'
depends=('php-legacy')
cd "${srcdir}/build"
make -j1 INSTALL_ROOT="${pkgdir}" install-cgi
}
package_php-legacy-apache() {
pkgdesc='Apache SAPI for PHP'
depends=('php-legacy' 'apache' 'libnsl')
backup=('etc/httpd/conf/extra/php-legacy_module.conf')
install -D -m755 "${srcdir}/build-apache/libs/libphp.so" "${pkgdir}/usr/lib/httpd/modules/libphp-legacy.so"
install -D -m644 "${srcdir}/apache.conf" "${pkgdir}/etc/httpd/conf/extra/php-legacy_module.conf"
}
package_php-legacy-fpm() {
pkgdesc='FastCGI Process Manager for PHP'
depends=('php-legacy' 'systemd')
backup=('etc/php-legacy/php-fpm.conf' 'etc/php-legacy/php-fpm.d/www.conf')
options=('!emptydirs')
cd "${srcdir}/build"
make -j1 INSTALL_ROOT="${pkgdir}" install-fpm
install -D -m644 sapi/fpm/php-fpm.service "${pkgdir}/usr/lib/systemd/system/php-legacy-fpm.service"
install -D -m644 "${srcdir}/php-fpm.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/php-legacy-fpm.conf"
}
package_php-legacy-embed() {
pkgdesc='Embedded PHP SAPI library'
depends=('php-legacy' 'systemd-libs' 'libnsl' 'libxcrypt')
options=('!emptydirs')
cd "${srcdir}/build"
make -j1 INSTALL_ROOT="${pkgdir}" PHP_SAPI=embed install-sapi
mv "${pkgdir}/usr/lib/libphp.so" "${pkgdir}/usr/lib/libphp-legacy.so"
}
package_php-legacy-phpdbg() {
pkgdesc='Interactive PHP debugger'
depends=('php-legacy')
options=('!emptydirs')
cd "${srcdir}/build-phpdbg"
make -j1 INSTALL_ROOT="${pkgdir}" install-phpdbg
}
package_php-legacy-dblib() {
pkgdesc='dblib module for PHP'
depends=('php-legacy' 'freetds')
install -D -m755 "${srcdir}/build/modules/pdo_dblib.so" "${pkgdir}/usr/lib/php-legacy/modules/pdo_dblib.so"
}
package_php-legacy-enchant() {
pkgdesc='enchant module for PHP'
depends=('php-legacy' 'enchant')
install -D -m755 "${srcdir}/build/modules/enchant.so" "${pkgdir}/usr/lib/php-legacy/modules/enchant.so"
}
package_php-legacy-gd() {
pkgdesc='gd module for PHP'
depends=('php-legacy' 'gd')
install -D -m755 "${srcdir}/build/modules/gd.so" "${pkgdir}/usr/lib/php-legacy/modules/gd.so"
}
package_php-legacy-sodium() {
pkgdesc='sodium module for PHP'
depends=('php-legacy' 'libsodium')
install -D -m755 "${srcdir}/build/modules/sodium.so" "${pkgdir}/usr/lib/php-legacy/modules/sodium.so"
}
package_php-legacy-odbc() {
pkgdesc='ODBC modules for PHP'
depends=('php-legacy' 'unixodbc')
install -D -m755 "${srcdir}/build/modules/odbc.so" "${pkgdir}/usr/lib/php-legacy/modules/odbc.so"
install -D -m755 "${srcdir}/build/modules/pdo_odbc.so" "${pkgdir}/usr/lib/php-legacy/modules/pdo_odbc.so"
}
package_php-legacy-pgsql() {
pkgdesc='PostgreSQL modules for PHP'
depends=('php-legacy' 'postgresql-libs')
install -D -m755 "${srcdir}/build/modules/pgsql.so" "${pkgdir}/usr/lib/php-legacy/modules/pgsql.so"
install -D -m755 "${srcdir}/build/modules/pdo_pgsql.so" "${pkgdir}/usr/lib/php-legacy/modules/pdo_pgsql.so"
}
package_php-legacy-pspell() {
pkgdesc='pspell module for PHP'
depends=('php-legacy' 'aspell')
install -D -m755 "${srcdir}/build/modules/pspell.so" "${pkgdir}/usr/lib/php-legacy/modules/pspell.so"
}
package_php-legacy-snmp() {
pkgdesc='snmp module for PHP'
depends=('php-legacy' 'net-snmp')
install -D -m755 "${srcdir}/build/modules/snmp.so" "${pkgdir}/usr/lib/php-legacy/modules/snmp.so"
}
package_php-legacy-sqlite() {
pkgdesc='sqlite module for PHP'
depends=('php-legacy' 'sqlite')
install -D -m755 "${srcdir}/build/modules/sqlite3.so" "${pkgdir}/usr/lib/php-legacy/modules/sqlite3.so"
install -D -m755 "${srcdir}/build/modules/pdo_sqlite.so" "${pkgdir}/usr/lib/php-legacy/modules/pdo_sqlite.so"
}
package_php-legacy-tidy() {
pkgdesc='tidy module for PHP'
depends=('php-legacy' 'tidy')
install -D -m755 "${srcdir}/build/modules/tidy.so" "${pkgdir}/usr/lib/php-legacy/modules/tidy.so"
}
package_php-legacy-xsl() {
pkgdesc='xsl module for PHP'
depends=('php-legacy' 'libxslt')
install -D -m755 "${srcdir}/build/modules/xsl.so" "${pkgdir}/usr/lib/php-legacy/modules/xsl.so"
}

View file

@ -0,0 +1,13 @@
# Required modules: dir_module, php-legacy_module
<IfModule dir_module>
<IfModule php-legacy_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
</IfModule>
</IfModule>

View file

@ -0,0 +1,10 @@
--- sapi/apache2handler/config.m4.orig
+++ sapi/apache2handler/config.m4
@@ -114,7 +114,6 @@
PHP_BUILD_THREAD_SAFE
fi
else
- APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'`
if test -n "$APACHE_THREADED_MPM"; then
PHP_BUILD_THREAD_SAFE
fi

106
extra/php-legacy/generate_patches Executable file
View file

@ -0,0 +1,106 @@
#!/bin/bash
. PKGBUILD
makepkg -o --nodeps --noprepare --skipinteg
pushd "src/php-${pkgver}"
sed '/APACHE_THREADED_MPM=/d' -i.orig sapi/apache2handler/config.m4
sed 's/.conf.default/.conf/g' -i.orig sapi/fpm/Makefile.frag
sed \
-e 's#run/php-fpm.pid#/run/php-fpm-legacy/php-fpm.pid#' \
-e 's#^;error_log =.*#error_log = syslog#' \
-i.orig sapi/fpm/php-fpm.conf.in
sed \
-e 's#^listen =.*#listen = /run/php-fpm-legacy/php-fpm.sock#' \
-e 's#^;listen.owner =#listen.owner =#' \
-e 's#^;listen.group =#listen.group =#' \
-e 's#^;chdir =.*#;chdir = /srv/http#' \
-i.orig sapi/fpm/www.conf.in
sed \
-e 's#^PIDFile=.*#PIDFile=/run/php-fpm-legacy/php-fpm.pid#' \
-e 's#^ExecStart=@EXPANDED_SBINDIR@/php-fpm#ExecStart=@EXPANDED_SBINDIR@/php-fpm-legacy#' \
-i.orig sapi/fpm/php-fpm.service.in
# available extensions after build
# find /var/lib/archbuild/*-x86_64/*/build/php/src/build/modules -name '*.so' -exec basename {} .so \; | sort -u
availableExtensions=(
bcmath
bz2
calendar
curl
dba
enchant
exif
ffi
ftp
gd
gettext
gmp
iconv
intl
ldap
mysqli
odbc
opcache
pdo_dblib
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
pspell
shmop
snmp
soap
sockets
sodium
sqlite3
sysvmsg
sysvsem
sysvshm
tidy
xsl
zip
)
extensions=''
for extension in "${availableExtensions[@]}"; do
if [[ $extension == 'curl' ]]; then
extensions+="extension=${extension}\n"
elif [[ $extension == 'opcache' ]]; then
extensions+=";zend_extension=${extension}\n"
elif [[ $extension == 'zip' ]]; then
extensions+="extension=${extension}\n"
else
extensions+=";extension=${extension}\n"
fi
done
sed \
-r ":a;N;\$!ba;s/; Notes for Windows environments :\n.+;?extension=\w+\n/${extensions}/g" \
-i.orig php.ini-production
sed \
-e 's#^;extension_dir = "\./"$#extension_dir = "/usr/lib/php-legacy/modules/"#g' \
-i php.ini-production
diff -u sapi/apache2handler/config.m4.orig sapi/apache2handler/config.m4 | filterdiff --clean --remove-timestamps > ../../apache.patch
{
diff -u sapi/fpm/Makefile.frag.orig sapi/fpm/Makefile.frag
diff -u sapi/fpm/php-fpm.conf.in.orig sapi/fpm/php-fpm.conf.in
diff -u sapi/fpm/www.conf.in.orig sapi/fpm/www.conf.in
diff -u sapi/fpm/php-fpm.service.in.orig sapi/fpm/php-fpm.service.in
} | filterdiff --clean --remove-timestamps > ../../php-fpm.patch
diff -u php.ini-production.orig php.ini-production | filterdiff --clean --remove-timestamps > ../../php.ini.patch
sed -i.orig 's/ \[php-config\],/ [php-config-legacy],/g' scripts/phpize.m4
diff -u scripts/phpize.m4.orig scripts/phpize.m4 | filterdiff --clean --remove-timestamps > ../../php-legacy.patch
popd

View file

@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGCHQTYBEAC6IU9aXEpVuLJNAzXwL7q9Vt1PkxJHr7kJynUg/3ISrOdJy2Eb
ola7GbEdvLZ69o+NbsL5vmOmT2AD0pEGfMgE9KWJ122iEfN4hrWThz+sHcVd/TKX
9E98g+HTpoJGtYcp6jYxG0YRP7dn1zSn9CawVJpMsoS2G0JZB/q2lIELoPRLMjic
RDBEfamTPi3vyYiuf4vvCcYYz3AEMYirt5f7rBrVOs3FVBozEqrN2fPRWvFgTnhs
Q8MEiq5/DMsnxFq2wgheAKPIAXhZiJFoKHsrpiAANEmGZBY2pbW05rBY1ZmJpi1y
CrSk582cdPo2Ca+NrNEPJ9spoEinAtApp/orirJYbjKViWqmh7mYYyv/NAQKwGBE
1up3tSGVj0rKG3f9seLvYsApHf0lhEQN/ypzC+pYDlSXzWxcQ8bifixb6XulaEgB
5XOHwuvpTK6HoNNdZM44Fl+B/eAXaebL6Vh0P1EN/2DBr4FGNb8vlXdvGxs7rJbJ
8+aNmYeNIdg5qbYubNsO2fU7yw9kTDNTej63Ql1a0Md2wfZze8dZy6LJ/tL//IH3
JPd0jvT1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PeH2G
l5+NjQYSIcQOcYo/MGuiikA9GJu088+IgJ8bmTiFgMuq/ZLAuQ6gkpZBQXAN2hVI
kV6H5IJwp8lbyf8GG0qBCk9Va03+PZjhZLu/fb9EzVmhyX95cENYNUE7QXQplsJZ
qchsBbjgQE38DWiZKT7uyRhZUCUD3h9ZIsYo63NrQNoA+xkz9tub+4cXQV6iJi/G
qeBTcg==
=pA4h
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -0,0 +1,76 @@
--- sapi/fpm/Makefile.frag.orig
+++ sapi/fpm/Makefile.frag
@@ -15,8 +15,8 @@
else \
echo "Installing PHP FPM defconfig: $(INSTALL_ROOT)$(sysconfdir)/" && \
$(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d; \
- $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default; \
- $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf.default; \
+ $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf; \
+ $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf; \
fi
@echo "Installing PHP FPM man page: $(INSTALL_ROOT)$(mandir)/man8/"
--- sapi/fpm/php-fpm.conf.in.orig
+++ sapi/fpm/php-fpm.conf.in
@@ -14,14 +14,14 @@
; Pid file
; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
; Default Value: none
-;pid = run/php-fpm.pid
+;pid = /run/php-fpm-legacy/php-fpm.pid
; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; into a local file.
; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
; Default Value: log/php-fpm.log
-;error_log = log/php-fpm.log
+error_log = syslog
; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
--- sapi/fpm/www.conf.in.orig
+++ sapi/fpm/www.conf.in
@@ -33,7 +33,7 @@
; (IPv6 and IPv4-mapped) on a specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
-listen = 127.0.0.1:9000
+listen = /run/php-fpm-legacy/php-fpm.sock
; Set listen(2) backlog.
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
@@ -45,8 +45,8 @@
; and group can be specified either by name or by their numeric IDs.
; Default Values: user and group are set as the running user
; mode is set to 0660
-;listen.owner = @php_fpm_user@
-;listen.group = @php_fpm_group@
+listen.owner = @php_fpm_user@
+listen.group = @php_fpm_group@
;listen.mode = 0660
; When POSIX Access Control Lists are supported you can set them using
; these options, value is a comma separated list of user/group names.
@@ -395,7 +395,7 @@
; Chdir to this directory at the start.
; Note: relative path can be used.
; Default Value: current directory or / when chroot
-;chdir = /var/www
+;chdir = /srv/http
; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
--- sapi/fpm/php-fpm.service.in.orig
+++ sapi/fpm/php-fpm.service.in
@@ -8,8 +8,8 @@
[Service]
Type=@php_fpm_systemd@
-PIDFile=@EXPANDED_LOCALSTATEDIR@/run/php-fpm.pid
-ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf
+PIDFile=/run/php-fpm-legacy/php-fpm.pid
+ExecStart=@EXPANDED_SBINDIR@/php-fpm-legacy --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
# Set up a new file system namespace and mounts private /tmp and /var/tmp directories

View file

@ -0,0 +1 @@
d /run/php-fpm-legacy 755 root root

View file

@ -0,0 +1,11 @@
--- scripts/phpize.m4.orig
+++ scripts/phpize.m4
@@ -51,7 +51,7 @@
PHP_ARG_WITH([php-config],,
[AS_HELP_STRING([--with-php-config=PATH],
[Path to php-config [php-config]])],
- [php-config],
+ [php-config-legacy],
[no])
dnl For BC.

View file

@ -0,0 +1,83 @@
--- php.ini-production.orig
+++ php.ini-production
@@ -760,7 +760,7 @@
; Directory in which the loadable extensions (modules) reside.
; https://php.net/extension-dir
-;extension_dir = "./"
+extension_dir = "/usr/lib/php-legacy/modules/"
; On windows:
;extension_dir = "ext"
@@ -908,56 +908,43 @@
; deprecated in a future PHP major version. So, when it is possible, please
; move to the new ('extension=<ext>) syntax.
;
-; Notes for Windows environments :
-;
-; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
-; extension folders as well as the separate PECL DLL download (PHP 5+).
-; Be sure to appropriately set the extension_dir directive.
-;
+;extension=bcmath
;extension=bz2
-
-; The ldap extension must be before curl if OpenSSL 1.0.2 and OpenLDAP is used
-; otherwise it results in segfault when unloading after using SASL.
-; See https://github.com/php/php-src/issues/8620 for more info.
-;extension=ldap
-
-;extension=curl
+;extension=calendar
+extension=curl
+;extension=dba
+;extension=enchant
+;extension=exif
;extension=ffi
;extension=ftp
-;extension=fileinfo
;extension=gd
;extension=gettext
;extension=gmp
+;extension=iconv
;extension=intl
-;extension=imap
-;extension=mbstring
-;extension=exif ; Must be after mbstring as it depends on it
+;extension=ldap
;extension=mysqli
-;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
-;extension=oci8_19 ; Use with Oracle Database 19 Instant Client
;extension=odbc
-;extension=openssl
-;extension=pdo_firebird
+;zend_extension=opcache
+;extension=pdo_dblib
;extension=pdo_mysql
-;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
+;extension=pspell
;extension=shmop
-
-; The MIBS data available in the PHP distribution must be installed.
-; See https://www.php.net/manual/en/snmp.installation.php
;extension=snmp
-
;extension=soap
;extension=sockets
;extension=sodium
;extension=sqlite3
+;extension=sysvmsg
+;extension=sysvsem
+;extension=sysvshm
;extension=tidy
;extension=xsl
-
-;zend_extension=opcache
+extension=zip
;;;;;;;;;;;;;;;;;;;
; Module Settings ;