Skip to content

Commit 9c4868c

Browse files
committed
Update PHP 7.3.8 and dependencies
1 parent 7e363f5 commit 9c4868c

File tree

5 files changed

+116
-166
lines changed

5 files changed

+116
-166
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 iTX Technologies
3+
Copyright (c) 2016-2019 iTX Technologies
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
## Script for building Windows PHP packages
22

33
The script need to be ran on Linux.
4-
Dependencies: aria2, bsdtar
54

65
## Script for building and installing PHP on Linux
76

87
Run this to build and install PHP configure to match your environment.
98
You need basic compiler package group, build dependencies and curl, sudo, tar.
109

1110
The following is just for reference:
12-
* For Debian-based distros: `libssl-dev autoconf pkg-config curl libedit-dev libsqlite3-dev libxml2-dev libcurl4-openssl-dev libyaml-dev libzip-dev libgmp-dev`
11+
* For Debian-based distros: `libssl-dev autoconf pkg-config curl libedit-dev libsqlite3-dev libxml2-dev libcurl4-openssl-dev libyaml-dev libzip-dev libgmp-dev libsodium-dev libjpeg-dev libpng-dev libwebp-dev libfreetype6-dev`
1312
* For RPM-based-distros: `autoconf pkg-config curl libedit-devel libsqlite3-devel libxml2-devel libyaml-devel libcurl-devel libzip-last-devel libgmp-devel`
1413

15-
* If you are using Ubuntu 17.04 and above, configure can not locate the libcurl, so you need to `sudo ln -s /usr/include/x86_64-linux-gnu/curl /usr/include`
14+
* If you are using Ubuntu 17.04, configure can not locate the libcurl, so you need to `sudo ln -s /usr/include/x86_64-linux-gnu/curl /usr/include`
1615

1716
Environment variable "$PREFIX" can be set to install to other locations (must be absolute path). The default is /usr/local, which most time has the highest priority in the PATH.
1817

install.sh

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#!/bin/bash
2+
3+
# Requirements: curl, sudo, tar, building tools
4+
5+
PREFIX=/usr/local
6+
SUDO=sudo
7+
DL=wget
8+
PROXYCHAINS=
9+
10+
PHP_VERSION=7.3.8
11+
YAML_VERSION=2.0.4
12+
SWOOLE_VERSION=4.4.3
13+
ZIP_VERSION=1.15.4
14+
15+
set -e
16+
17+
mkdir -p temp
18+
cd temp
19+
20+
$PROXYCHAINS $DL http://www.php.net/distributions/php-$PHP_VERSION.tar.xz
21+
tar -xJf php-$PHP_VERSION.tar.xz
22+
cd php-$PHP_VERSION
23+
24+
echo \
25+
--disable-cgi \
26+
--enable-mbstring \
27+
--enable-bcmath \
28+
--enable-pdo \
29+
--with-mysql-pdo \
30+
--with-sodium \
31+
--enable-sockets \
32+
--with-curl \
33+
--with-libedit \
34+
--with-openssl \
35+
--with-zlib \
36+
--with-gmp \
37+
--with-gd \
38+
--with-jpeg-dir \
39+
--with-webp-dir \
40+
--with-png-dir \
41+
--with-freetype-dir \
42+
--enable-pcntl \
43+
--enable-maintainer-zts \
44+
--prefix="$PREFIX"
45+
46+
make -j`nproc`
47+
$SUDO make install
48+
cd ..
49+
50+
$PROXYCHAINS git clone https://github.com/krakjoe/pthreads.git --depth=1
51+
cd pthreads
52+
phpize
53+
./configure
54+
make -j'nproc'
55+
$SUDO make install
56+
cd ..
57+
58+
$PROXYCHAINS $DL https://pecl.php.net/get/swoole-$SWOOLE_VERSION.tgz
59+
tar -zxf swoole-$SWOOLE_VERSION.tgz
60+
cd swoole-$SWOOLE_VERSION
61+
phpize
62+
./configure --enable-http2 --enable-sockets --enable-openssl
63+
make -j'nproc'
64+
$SUDO make install
65+
cd ..
66+
67+
$PROXYCHAINS git clone https://github.com/swoole/ext-async.git --depth=1
68+
cd ext-async
69+
phpize
70+
./configure
71+
make -j'nproc'
72+
$SUDO make install
73+
cd ..
74+
75+
$PROXYCHAINS $DL https://pecl.php.net/get/yaml-$YAML_VERSION.tgz
76+
tar -zxf yaml-$YAML_VERSION.tgz
77+
cd yaml-$YAML_VERSION
78+
phpize
79+
./configure
80+
make -j'nproc'
81+
$SUDO make install
82+
cd ..
83+
84+
$PROXYCHAINS $DL https://pecl.php.net/get/zip-$ZIP_VERSION.tgz
85+
tar -zxf zip-$ZIP_VERSION.tgz
86+
cd zip-$ZIP_VERSION
87+
phpize
88+
./configure
89+
make -j'nproc'
90+
$SUDO make install
91+
cd ..
92+
93+
$PROXYCHAINS git clone https://github.com/runkit7/runkit7.git --depth=1
94+
cd runkit7
95+
phpize
96+
./configure
97+
make -j'nproc'
98+
$SUDO make install
99+
cd ..
100+
101+
echo "phar.readonly = off
102+
extension = yaml.so
103+
extension = pthreads.so
104+
extension = swoole.so
105+
extension = swoole_async.so
106+
extension = runkit.so
107+
extension = zip.so
108+
zend_extension = opcache.so
109+
zend.assertions = -1
110+
" | $SUDO tee "$PREFIX/lib/php.ini" > /dev/null
111+
112+
cd ..
113+
rm -rf temp

linux-build-install.sh

Lines changed: 0 additions & 44 deletions
This file was deleted.

windows-binaries.sh

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)