0

I've been trying to setup tombs zend extension for php on my ubuntu 16.04 server since last 24 hours and not been able to.

zend extension: https://github.com/krakjoe/tombs

First, I tried to set it up on php7.0-fpm version, everytime I would enable the extension in /etc/php/7.0/fpm/php.ini

[ZEND]
zend_extension = /usr/lib/php/20151012/tombs.so

I would get a "502 Bad Gateway nginx" error.

In nginx error logs, log entry is,

2020/02/04 10:29:27 [error] 1005#1005: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.2.2, server: _, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "192.168.2.4"

Then I tried it with php7.1-fpm, I followed these steps:

sudo update-alternatives --set phpize /usr/bin/phpize7.1
sudo update-alternatives --set php /usr/bin/php7.1
sudo update-alternatives --set php-config /usr/bin/php-config7.1

sudo phpize
sudo ./configure --with-php-config=/usr/bin/php-config7.1
sudo make
sudo make install

I change nginx configurations for php7.1-fpm and add zend extension in php.ini but on running php -v, it doesn't mention the tombs extension in output and neither in phpinfo page but there is no "502 Bad Gateway nginx" error this time.

Then I tried the same thing with php7.2-fpm setup and this time on running php -v, I get:

Tombs requires Zend Engine API version 320151012.
The Zend Engine API version 320170718 which is installed, is newer.
Contact krakjoe at https://github.com/krakjoe/tombs for a later version of Tombs.

PHP 7.2.27-5+ubuntu16.04.1+deb.sury.org+2 (cli) (built: Feb  1 2020 18:00:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.27-5+ubuntu16.04.1+deb.sury.org+2, Copyright (c) 1999-2018, by Zend Technologies

This Zend Engine API version "320151012" is for php7.0-fpm but on the extensions github page it says, requires "php7.1+".

I've tried everything I could to get it work but I'm not able to. Any help would be really appreciated.

If any more information is required, Please let me know in the comments.

Axel
  • 113
  • 3
  • It does not show Tombs in `-v` output as you have the extension disabled in the CLI SAPI from the looks of it. Not certain if it should show up in phpinfo or not. When PHP 7.1 FPM boots, can you do a scan locally to see if the tombs socket is running or not? – ojrask Feb 05 '20 at 08:51
  • I again changed php-fpm version to php7.0-fpm and followed above steps again and also added zend extension in /etc/php/7.0/cli/php.ini as well. – Axel Feb 05 '20 at 09:25
  • On running **php -v** now, I'm getting, `PHP Warning: [TOMBS] Permission denied - cannot create socket for zend.tombs.socket in Unknown on line 0 PHP 7.0.33-19+ubuntu16.04.1+deb.sury.org+2 (cli) (built: Feb 1 2020 18:05:20) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Tombs v0.0.2-dev, Copyright (c) 2019, by krakjoe with Zend OPcache v7.0.33-19+ubuntu16.04.1+deb.sury.org+2, Copyright (c) 1999-2017, by Zend Technologies` – Axel Feb 05 '20 at 09:26
  • Writer of the extesnion replied to me on Reddit, here's the thread. [link](https://www.reddit.com/r/PHP/comments/eyuppf/need_help_in_setting_up_tombs_zend_extension/) I'm trying it with php7.1-fpm now. – Axel Feb 05 '20 at 09:54

0 Answers0