DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
493 stars 152 forks source link

0.83.0 Release PHP 5.6 no longer supported? #1857

Closed ilia-rebane-vectorsolutions closed 1 year ago

ilia-rebane-vectorsolutions commented 1 year ago

In 0.83.0 Release. Throws: ERROR: nts builds of PHP are currently not supported No info in release notes about php version change/drop. Works fine with previous(0.82.0) release.

bwoebi commented 1 year ago

Hm. It wasn't dropped and it still works for me.

# php -v
PHP 5.6.40-64+0~20230107.71+debian10~1.gbp673146 (cli) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
# php datadog-setup.php        
Searching for available php binaries, this operation might take a while.
Multiple PHP binaries detected. Please select the binaries the datadog library will be installed to:

   1. php --> /usr/bin/php5.6
   2. php5.6 --> /usr/bin/php5.6
   3. php-fpm5.6 --> /usr/sbin/php-fpm5.6

Select binaries using their number. Multiple binaries separated by space (example: 1 3): 2 
Downloading installable archive from https://github.com/DataDog/dd-trace-php/releases/download/0.83.0/dd-library-php-0.83.0-x86_64-linux-gnu.tar.gz.
This operation might take a while.
.................
Download completed

Installed required source files to '/opt/datadog/dd-library/0.83.0'
Installing to binary: php5.6 (/usr/bin/php5.6)
Copied '/tmp/dd-install/dd-library-php/trace/ext/20131106/ddtrace.so' to '/usr/lib/php/20131226/ddtrace.so'
Updating existing INI file '/etc/php/5.6/cli/conf.d/98-ddtrace.ini'
Installation to 'php5.6 (/usr/bin/php5.6)' was successful
Updating existing INI file '/etc/php/5.6/apache2/conf.d/98-ddtrace.ini'
Installation to 'php5.6 (/usr/bin/php5.6)' was successful
--------------------------------------------------
SUCCESS

To run this script in a non interactive mode, use the following options:
  php 'datadog-setup.php' '--php-bin=php5.6'

Do you use a specific configuration of PHP? e.g. ZTS or debug?

ilia-rebane-vectorsolutions commented 1 year ago

Nothing special docker Image based on php:5.6-fpm-alpine Again previous version of the script is working fine.

bwoebi commented 1 year ago

Actually, also on php:5.6-fpm-alpine it works for me:

$ docker run --rm -ti --platform=linux/amd64 php:5.6-fpm-alpine sh
Unable to find image 'php:5.6-fpm-alpine' locally
...
Status: Downloaded newer image for php:5.6-fpm-alpine
/var/www/html # wget https://github.com/DataDog/dd-trace-php/releases/download/0.83.0/datadog-setup.php
Connecting to github.com (140.82.121.4:443)
Connecting to objects.githubusercontent.com (185.199.110.133:443)
datadog-setup.php    100% |*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************| 58149   0:00:00 ETA
/var/www/html # php datadog-setup.php --php-bin=all
Searching for available php binaries, this operation might take a while.
Downloading installable archive from https://github.com/DataDog/dd-trace-php/releases/download/0.83.0/dd-library-php-0.83.0-x86_64-linux-musl.tar.gz.
This operation might take a while.
...................
Download completed

Installed required source files to '/opt/datadog/dd-library/0.83.0'
Installing to binary: php (/usr/local/bin/php)
Copied '/tmp/dd-install/dd-library-php/trace/ext/20131106/ddtrace.so' to '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ddtrace.so'
Created INI file '/usr/local/etc/php/conf.d/98-ddtrace.ini'
Installation to 'php (/usr/local/bin/php)' was successful
Installing to binary: php-fpm (/usr/local/sbin/php-fpm)
[18-Jan-2023 15:47:26] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ddtrace.so' - Error loading shared library libexecinfo.so.1: No such file or directory (needed by /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ddtrace.so) in Unknown on line 0
[18-Jan-2023 15:47:26] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ddtrace.so' - Error loading shared library libexecinfo.so.1: No such file or directory (needed by /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ddtrace.so) in Unknown on line 0
[18-Jan-2023 15:47:26] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ddtrace.so' - Error loading shared library libexecinfo.so.1: No such file or directory (needed by /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ddtrace.so) in Unknown on line 0
Copied '/tmp/dd-install/dd-library-php/trace/ext/20131106/ddtrace.so' to '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ddtrace.so'
Updating existing INI file '/usr/local/etc/php/conf.d/98-ddtrace.ini'
Installation to 'php-fpm (/usr/local/sbin/php-fpm)' was successful
--------------------------------------------------
SUCCESS

@ilia-rebane-vectorsolutions Did you by chance use the linux/arm64 builds of your docker container? PHP 5 does not have arm64 builds.

ilia-rebane-vectorsolutions commented 1 year ago

Nope, we use Circle Ci to build our images. Locally docker buildx build --platform linux/amd64 to get the image.

bwoebi commented 1 year ago

On that note, I noticed that, while it installed fine, libexecinfo was still required on PHP 5. That should be better now in 0.83.1. But it sounds like your issue is more fundamental. I have no idea why it should happen though - as I cannot reproduce it.

Could you please give me full reproduction instructions?

ilia-rebane-vectorsolutions commented 1 year ago

I was prepping the Dockerfile to prove the issue and now it builds fine for me. Thanks for fast response.

drupol commented 1 year ago

Sorry in advance to reopen this old topic, but I would like to have some clarifications.

The last version of datadog_trace that I'm able to compile with PHP 5.6 is version 0.75.0. How do you guys are you using older versions ?

bwoebi commented 1 year ago

Hey @drupol, we do not release new PECL versions anymore for PHP 5, as part of our phase-out of PHP 5 support. If you want to compile it from source, clone this github repository and check out the PHP-5 branch.

Otherwise, use our installer, which still includes the PHP-5 artifacts.

drupol commented 1 year ago

Hey @drupol, we do not release new PECL versions anymore for PHP 5, as part of our phase-out of PHP 5 support. If you want to compile it from source, clone this github repository and check out the PHP-5 branch.

Otherwise, use our installer, which still includes the PHP-5 artifacts.

Fair enough! Thanks for replying.

Last question, what is the latest stable (tag?) version for PHP 5 then ?

bwoebi commented 1 year ago

That should be 0.75.0.

drupol commented 1 year ago

That should be 0.75.0.

Perfect, that's what I used in https://github.com/fossar/nix-phps/pull/257

Thanks!