Skip to content

/root/pht/src/pht_copy.c:784: copy_zval_table: Assertion `0' failed #14

@z3nth10n

Description

@z3nth10n

I compiled PHP using this commands:

#!/bin/sh
git clone https://github.com/php/php-src.git -b PHP-7.2.27 --depth=1 php-src-7.2
cd php-src-7.2
rm -rf /etc/php7

./buildconf --force

./configure --prefix=/etc/php7 --with-bz2 --with-zlib --enable-zip --disable-cgi \
   --enable-soap --enable-intl --with-mcrypt --with-openssl --with-readline --with-curl \
   --enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
   --enable-sockets --enable-pcntl --with-pspell --with-enchant --with-gettext \
   --with-gd --enable-exif --with-jpeg-dir --with-png-dir --with-freetype-dir --with-xsl \
   --enable-bcmath --enable-mbstring --enable-calendar --enable-simplexml --enable-json \
   --enable-hash --enable-session --enable-xml --enable-wddx --enable-opcache \
   --with-pcre-regex --with-config-file-path=/etc/php7/cli \
   --with-config-file-scan-dir=/etc/php7/etc --enable-cli --enable-maintainer-zts \
   --with-tsrm-pthreads --enable-debug --enable-fpm \
   --with-fpm-user=www-data --with-fpm-group=www-data

make && make install

chmod o+x /etc/php7/bin/phpize
chmod o+x /etc/php7/bin/php-config

mkdir /etc/php7/cli
cp php.ini-production /etc/php7/cli/php.ini

sed -e '924iextension=/etc/php7/lib/php/extensions/debug-zts-20170718/pht.so' -i /etc/php7/cli/php.ini

update-alternatives --install /usr/bin/php php /etc/php7/bin/php 74
update-alternatives --install /usr/bin/phpize phpize /etc/php7/bin/phpize 99

And then, I installed pht:

cd ~
rm -rf pht
git clone https://github.com/tpunt/pht
cd pht
git checkout tags/v0.0.1
phpize
./configure --prefix=/etc/php7 --with-libdir=/lib/x86_64-linux-gnu --enable-pthreads=shared --with-php-config=/etc/php7/bin/php-config
make
make install

Then I runned the command php script.php this error prompted:

/root/pht/src/pht_copy.c:784: copy_zval_table: Assertion 0' failed`

https://github.com/tpunt/phactor/blob/master/src/ph_copy.c#L784

PHP Version: 7.2.27

I need to use a lower PHP version?

EDIT: I tried version 7.2.4 (from March 2018, the latest commit on this repo was April 2018)

root@debian:/var/www/api.z3nth10n.net# php -v
PHP 7.2.4-dev (cli) (built: Jan 23 2020 11:01:58) ( ZTS DEBUG )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

But this is still not working... :(

EDIT2: I edited the line to return NULL; by the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions