PHPnews.io

Why does the PHP extension fail to load with _zval_ptr_dtor_wrapper error

Written by Benjamin Eberlei / Original link on Mar. 28, 2017

Why does the PHP extension fail to load with _zval_ptr_dtor_wrapper error

I sometimes come across this error when loading an extension in PHP

PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php-zts/5.5/modules/myext.so' -
/usr/lib64/php-zts/5.5/modules/myext.so: undefined symbol:
_zval_ptr_dtor_wrapper in Unknown on line 0

From the Google results it is not very easy to find out what this means.

Technically the extension was compiled with a PHP version using the -enable-debug flag, which wraps all calls to zval_ptr_dtor in a wrapper macro that does not exist in a regular, non-debug build.

But a debug extension and non-debug PHP are incompatible.

PHP extensions are only compatible between different installations if the following constraints are the same for the compiling and the executing PHP binary:

beberlei

« Hide Slack unread and highlight Tray Icon on Ubuntu/Linux - How to complete a side project and turn it into a business (Level 1) »