0

As title says, how to compile and install official PHP-8 on linux/ubuntu with Zend-Thread-Safe support? I've seen using 3rd party repositories, but wanted the steps for official PHP-8.

T.Todua
  • 53,146
  • 19
  • 236
  • 237
  • (btw, this is old question, obsolete : https://stackoverflow.com/questions/30001606/compile-php-with-zts-support-on-ubuntu-14-04 ) – T.Todua Apr 24 '21 at 19:39

2 Answers2

1
git clone https://github.com/php/php-src.git
cd php-src
./buildconf
./configure --enable-zts
make -j4
make install
ooo
  • 43
  • 1
  • 9
0

Aside of using ondrej repository (as seen on many sites) I've found a way to install PHP-8 from official php.net packages. I've followed this tutorial , however, just changed php7 references with php8 and it succeeded.

However, during installation I needed to do:

  • apt-get install sqlite3 re2c
  • apt-get install sqlite3 libsqlite3-dev
  • apt-get install libonig-dev
T.Todua
  • 53,146
  • 19
  • 236
  • 237
  • This answer would be more useful if it summarised the key steps itself. As it is, if the tutorial you linked to goes offline, the answer won't really say anything. – IMSoP Apr 26 '21 at 08:57
  • You can use `--without-sqlite3 --without-pdo-sqlite` to avoid the need to install sqlite – Tofandel Jun 20 '21 at 09:46
  • Ondrej sury no longer packages php with zts - you are left to build from source. https://github.com/oerdnj/deb.sury.org/issues/1392#issuecomment-623591749 – Dannyboy Nov 11 '21 at 09:54