Undefined Symbol php_json_encode Startup Error
After installation of Tideways when running the PHP CLI or when starting it within a webserver or php-fpm you could come across the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/tideways.so' - /usr/lib64/php/modules/tideways.so: undefined symbol: php_json_encode in Unknown on line 0
The Tideways PHP extension requires the JSON extension as a dependency to be installed and activated.
The json extension is built into PHP and should be available on all distributions and installations, but one step that could fail is the order in which the PHP extensions are loaded. If the extension=json.so line is defined after the extension=tideways.so line, then older versions of PHP cannot resolve the dependency correctly and this error occurs.
Make sure extension=json.so is loaded before extension=tideways.so
.
If your PHP installation uses configuration files for each extension, make sure that tideways.ini file has a number larger than the json.ini in its name prefix to order it last.