Skip to content

Instantly share code, notes, and snippets.

@MMazoni
Last active November 30, 2020 10:01
Show Gist options
  • Select an option

  • Save MMazoni/60995f21b6af6d765949c6c484195c14 to your computer and use it in GitHub Desktop.

Select an option

Save MMazoni/60995f21b6af6d765949c6c484195c14 to your computer and use it in GitHub Desktop.
PHP from source 8.0

PHP from source 8.0

Ubuntu/Debian

sudo apt install -y pkg-config build-essential autoconf bison re2c \
                    libxml2-dev libsqlite3-dev libonig-dev libssl-dev \
                    zlib1g-dev libcurl4-openssl-dev libedit-dev libreadline-dev

Arch

sudo pacman -Syu pkg-config base-devel autoconf bison re2c \
      libxml2 oniguruma

Generate the config:

./buildconf

Config:

./configure --prefix=$HOME/.php --enable-debug \
    --enable-mysqlnd \
    --with-pdo-mysql \
    --with-pdo-mysql=mysqlnd \
    --with-mysqli=mysqlnd \
    --enable-bcmath \
    --enable-fpm \
    --with-fpm-user=www-data \
    --with-fpm-group=www-data \
    --enable-mbstring \
    --enable-phpdbg \
    --enable-shmop \
    --enable-sockets \
    --enable-sysvmsg \
    --enable-sysvsem \
    --enable-sysvshm \
    --with-curl \
    --with-pear \
    --with-openssl \
    --enable-pcntl \
    --with-readline \
    --with-zlib \
    --with-pdo-sqlite

Make and install:

make -j4

sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment