The original scripts try to install PHP 7.4.5, but a basic requirement of bison3 cannot be satisfied by Debian Wheezy, use this branch to get Debian Wheezy + PHP 7.3.33
These are a set of bash scripts for building and running PHP 7.3 (CLI and FPM) on Debian Wheezy based Linux distributions:
-
build.sh
installs the necessary build dependencies and the latest stable version of PHP 7.3.33 with CLI and FPM server APIs (SAPI) from the latest PHP 7.3.33 branch of https://github.com/php/php-src. -
install.sh
sets up PHP-FPM by moving configuration files into their correct locations in/opt/build/php/7.3
and enables thephp7.3-fpm
service and adds it to the startup sequence.
Please note that these are very simple scripts that don't implement error checking or process validation.
$ git clone https://github.com/gnanet/php-7-debian.git
$ cd php-7-debian
$ git checkout php7.3+deb7
$ ./build.sh
$ sudo ./install.sh
On systems with little amount of RAM such as Raspberry Pi you might want to decrease the number of parallel make
jobs by passing the JOB_COUNT
variable:
$ JOB_COUNT=1 ./build.sh
The default job count is equal to the number of CPU cores.
The PHP-FPM can be operated using the php7.3-fpm
init script:
Usage: /etc/init.d/php7.3-fpm {start|stop|status|restart|reload|force-reload}
while the FPM socket is available at
127.0.0.1:9007
and PHP CLI at /opt/build/php/7.3/bin/php
.
Pull down the latest changes from this repository git pull
and run ./build.sh
.
All PHP configuration files are stored under /opt/build/php/7.3
:
/opt/build/php/7.3/lib/php.ini
/opt/build/php/7.3/etc/php-fpm.conf
/opt/build/php/7.3/etc/php-fpm.d/www.conf
/opt/build/php/7.3/etc/conf.d/modules.ini
while the Debian init script is added to:
/etc/init.d/php7.3-fpm
Here is a list of PHP modules that are enabled by default in this build:
$ /opt/build/php/7.3/bin/php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
Please note that you need to restart php7.3-fpm
to activate the extension.
$ cd php-7-debian/extensions
$ ./memcached-build.sh
$ ./memcached-install.sh
$ cd php-7-debian/extensions
$ ./imagick-build.sh
$ ./imagick-install.sh
$ cd php-7-debian/extensions
$ ./redis-build.sh
$ ./redis-install.sh
$ cd php-7-debian/extensions
$ ./mcrypt-build.sh
$ ./mcrypt-install.sh
- Wheezy variant Created by Gergely Nagy
- Forked from
kasparsd/php-7-debian
by Kaspars Dambis - Contributors: Piotr Plenik
- Based on
php7.sh
by Tom Van Looy