Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile php #27

Open
xoceunder opened this issue Oct 8, 2024 · 1 comment
Open

compile php #27

xoceunder opened this issue Oct 8, 2024 · 1 comment

Comments

@xoceunder
Copy link

compile php

@amidevous
Copy link

amidevous commented Nov 27, 2024

hello php 7.4.33 latest with remi patch

original build parameter php 7.2 found on file

/home/xtreamcodes/iptv_xtream_codes/php/bin/php-config

php build

wget https://www.php.net/distributions/php-7.4.33.tar.xz
tar -xvf php-7.4.33.tar.xz
cd php-7.4.33
#add Remi Colet Security Patch
# Build fixes
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.0-httpd.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.2.0-includedir.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.0-embed.patch)
# For libxml 2.12 from 8.1
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.33-libxml212.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.2.0-libdb.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.33-gcc14.patch)
# Functional changes
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.3.3-systzdata-v19.patch)
# See http://bugs.php.net/53436
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.0-phpize.patch)
# Use -lldap_r for OpenLDAP
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.0-ldap_r.patch)
# Ignore unsupported "threads" option on password_hash
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.20-argon2.patch)
# drop "Configure command" from phpinfo output
# and add build system and provider (from 8.0)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.8-phpinfo.patch)
# fix snmp build without DES (from 8.0)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.26-snmp.patch)
# compatibility with OpenSSL 3.0, from 8.1
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.26-openssl3.patch)
rm -rf ext/openssl/tests/p12_with_extra_certs.p12
# RC Patch
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php72/php.git/plain/php-7.2.0-oci8conf.patch)
# Security fixes (200+)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-bug81740.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-bug81744.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-bug81746.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2023-0662.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2023-3247.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2023-3823.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2023-3824.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2024-2756.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2024-3096.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2024-5458.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2024-8925.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2024-8926.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2024-8927.patch)
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-cve-2024-9026.patch)
# Fixes for tests (300+)
# Factory is droped from system tzdata
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.0.10-datetests.patch)
# Make test slower
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.33-tests.patch)
# For zlib-ng
patch -p1 < <(wget -qO- https://git.remirepo.net/cgit/rpms/scl-php74/php.git/plain/php-7.4.33-zlib-tests.patch)

# ----- Manage known as failed test -------
# affected by systzdata patch
rm -rf ext/date/tests/timezone_location_get.phpt
rm -rfext/date/tests/bug33414-1.phpt
rm -rf ext/date/tests/date_modify-1.phpt
rm -rf ext/date/tests/bug33415-2.phpt
# too fast builder
rm -rf ext/date/tests/bug73837.phpt
# fails sometime
rm -rf ext/sockets/tests/mcast_ipv?_recv.phpt
# Should be skipped but fails sometime
rm -rf ext/standard/tests/file/file_get_contents_error001.phpt
# cause stack exhausion
rm -rf Zend/tests/bug54268.phpt
rm -rf Zend/tests/bug68412.phpt
# slow and erratic result
rm -rf sapi/cli/tests/upload_2G.phpt
# tar issue
rm -rf ext/zlib/tests/004-mb.phpt
# https://bugs.php.net/63362 - Not needed but installed headers.
# Drop some Windows specific headers to avoid installation,
# before build to ensure they are really not needed.
rm -f TSRM/tsrm_win32.h \
      TSRM/tsrm_config.w32.h \
      Zend/zend_config.w32.h \
      ext/mysqlnd/config-win.h \
      ext/standard/winver.h \
      main/win32_internal_function_disabled.h \
      main/win95nt.h
# Fix some bogus permissions
find . -name \*.[ch] -exec chmod 644 {} \;
libtoolize --force --copy
cat $(aclocal --print-ac-dir)/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >build/libtool.m4
# Regenerate configure scripts (patches change config.m4's)
touch configure.ac
./buildconf --force
./configure --prefix=/home/xtreamcodes/iptv_xtream_codes/php \
--with-zlib --with-zlib-dir=/usr \
--with-bz2=/usr \
--with-curl \
--with-freetype-dir=/usr \
--enable-mbstring \
--enable-calendar \
--with-gd \
--disable-rpath \
--enable-inline-optimization \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-mbregex \
--enable-exif \
--enable-bcmath \
--with-mhash \
--enable-zip \
--with-pcre-regex \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-openssl \
--with-fpm-user=xtreamcodes \
--with-fpm-group=xtreamcodes \
--with-libdir=/lib/x86_64-linux-gnu \
--with-gettext \
--with-xmlrpc \
--with-webp-dir=/usr \
--with-jpeg-dir=/usr \
--with-xsl \
--enable-opcache \
--enable-fpm \
--enable-libxml \
--enable-static \
--disable-shared
make -j$(nproc)
make install
cd ..
rm -rf php-7.4*

php extension mcrypt build

wget https://pecl.php.net/get/mcrypt-1.0.7.tgz
tar -xvf mcrypt-1.0.7.tgz
cd mcrypt-1.0.7
/home/xtreamcodes/iptv_xtream_codes/php/bin/phpize
./configure --with-php-config=/home/xtreamcodes/iptv_xtream_codes/php/bin/php-config
make -j$(nproc)
make install
cd ..
rm -rf mcrypt-1.0.*

php extension geoip build

wget https://pecl.php.net/get/geoip-1.1.1.tgz
tar -xvf geoip-1.1.1.tgz
cd geoip-1.1.1
/home/xtreamcodes/iptv_xtream_codes/php/bin/phpize
./configure --with-php-config=/home/xtreamcodes/iptv_xtream_codes/php/bin/php-config
make -j$(nproc)
make install
cd ..
rm -rf geoip-1.1.*

php extension igbinary build

wget https://pecl.php.net/get/igbinary-3.2.16.tgz
tar -xvf igbinary-3.2.16.tgz
cd igbinary-3.2.16
/home/xtreamcodes/iptv_xtream_codes/php/bin/phpize
./configure --with-php-config=/home/xtreamcodes/iptv_xtream_codes/php/bin/php-config
make -j$(nproc)
make install
cd ..
rm -rf igbinary-3.2.*

update ioncube loader and change php.ini path

based code adapt work for xtreamui xui.one odin streamcread ... and other panel work just adapt path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants