You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DATADOG TRACER CONFIGURATION - {"date":"2023-04-12T01:42:34Z","os_name":"Linux 756458f412c9 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 x86_64","os_version":"5.10.76-linuxkit","version":"1.0.0-nightly","lang":"php","lang_version":"5.6.40","env":null,"enabled":true,"service":null,"enabled_cli":false,"agent_url":"http:\/\/host.docker.internal:8126","debug":true,"analytics_enabled":false,"sample_rate":1,"sampling_rules":[],"tags":[],"service_mapping":[],"distributed_tracing_enabled":true,"priority_sampling_enabled":true,"dd_version":null,"architecture":"x86_64","sapi":"apache2handler","datadog.trace.request_init_hook":"\/opt\/datadog\/dd-library\/0.86.3\/dd-trace-sources\/bridge\/dd_wrap_autoloader.php","open_basedir_configured":false,"uri_fragment_regex":null,"uri_mapping_incoming":null,"uri_mapping_outgoing":null,"auto_flush_enabled":false,"generate_root_span":true,"http_client_split_by_domain":false,"measure_compile_time":true,"report_hostname_on_root_span":false,"traced_internal_functions":null,"auto_prepend_file_configured":false,"integrations_disabled":"default","enabled_from_env":true,"opcache.file_cache":null}
Additional info
When activating the tracer debug with DD_TRACE_DEBUG=1 the following error appeared on the error log:
specto_app | [Wed Apr 12 01:51:40.227595 2023] [:error] [pid 18] [client 172.19.0.1:57150] Error raised in request init hook: syntax error, unexpected ':', expecting ';' or '{' in /opt/datadog/dd-library/0.86.3/dd-trace-sources/bridge/_generated_integrations.PHP5.php on line 4049
When looking at that file in that line, you'll find the following syntax that is not supported in PHP5.6 private static function generateFilteredPostFields(string $postKey, $postVal, array $whitelist, bool $isPrefixed) : array
There are 3 parts in the file with that problem: root@01cd906dd4f3:/var/www/html# grep -a ": array" /opt/datadog/dd-library/0.86.3/dd-trace-sources/bridge/_generated_integrations.PHP5.php|grep -v "array()" private static function generateFilteredPostFields(string $postKey, $postVal, array $whitelist, bool $isPrefixed) : array private static function cleanRequestBody(array $requestBody, string $allowedParams) : array public static function sanitizePostFields(array $postFields) : array
I removed all three, and voila! problem gone :)
As a workaround, I've added the replace command to the container creation.
RUN sed -i 's/: array$//g' /opt/datadog/dd-library/0.86.3/dd-trace-sources/bridge/_generated_integrations.PHP5.php
The text was updated successfully, but these errors were encountered:
thanks for the report, we've indeed made a mistake here and will fix that with the next release. 0.85.0 does not contain that bug and is nearly identical too for PHP 5.
Bug description
When installing the agent on an image that was working ok, every page returns http code 500, even the simple <?php phpinfo(); file.
PHP version
PHP 5.6.40 (cli) (built: Jan 23 2019 00:10:05)
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
with ddtrace v1.0.0-nightly, Copyright Datadog, by Datadog
Tracer version
1.0.0-nightly
Installed extensions
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
ddtrace
dom
ereg
exif
fileinfo
filter
ftp
gd
hash
iconv
intl
json
libxml
mbstring
mcrypt
mhash
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
ddtrace
OS info
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
Diagnostics and configuration
Output of phpinfo() (ddtrace >= 0.47.0)
DATADOG TRACER CONFIGURATION - {"date":"2023-04-12T01:42:34Z","os_name":"Linux 756458f412c9 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 x86_64","os_version":"5.10.76-linuxkit","version":"1.0.0-nightly","lang":"php","lang_version":"5.6.40","env":null,"enabled":true,"service":null,"enabled_cli":false,"agent_url":"http:\/\/host.docker.internal:8126","debug":true,"analytics_enabled":false,"sample_rate":1,"sampling_rules":[],"tags":[],"service_mapping":[],"distributed_tracing_enabled":true,"priority_sampling_enabled":true,"dd_version":null,"architecture":"x86_64","sapi":"apache2handler","datadog.trace.request_init_hook":"\/opt\/datadog\/dd-library\/0.86.3\/dd-trace-sources\/bridge\/dd_wrap_autoloader.php","open_basedir_configured":false,"uri_fragment_regex":null,"uri_mapping_incoming":null,"uri_mapping_outgoing":null,"auto_flush_enabled":false,"generate_root_span":true,"http_client_split_by_domain":false,"measure_compile_time":true,"report_hostname_on_root_span":false,"traced_internal_functions":null,"auto_prepend_file_configured":false,"integrations_disabled":"default","enabled_from_env":true,"opcache.file_cache":null}
Additional info
When activating the tracer debug with DD_TRACE_DEBUG=1 the following error appeared on the error log:
specto_app | [Wed Apr 12 01:51:40.227595 2023] [:error] [pid 18] [client 172.19.0.1:57150] Error raised in request init hook: syntax error, unexpected ':', expecting ';' or '{' in /opt/datadog/dd-library/0.86.3/dd-trace-sources/bridge/_generated_integrations.PHP5.php on line 4049
When looking at that file in that line, you'll find the following syntax that is not supported in PHP5.6
private static function generateFilteredPostFields(string $postKey, $postVal, array $whitelist, bool $isPrefixed) : array
There are 3 parts in the file with that problem:
root@01cd906dd4f3:/var/www/html# grep -a ": array" /opt/datadog/dd-library/0.86.3/dd-trace-sources/bridge/_generated_integrations.PHP5.php|grep -v "array()" private static function generateFilteredPostFields(string $postKey, $postVal, array $whitelist, bool $isPrefixed) : array private static function cleanRequestBody(array $requestBody, string $allowedParams) : array public static function sanitizePostFields(array $postFields) : array
I removed all three, and voila! problem gone :)
As a workaround, I've added the replace command to the container creation.
RUN sed -i 's/: array$//g' /opt/datadog/dd-library/0.86.3/dd-trace-sources/bridge/_generated_integrations.PHP5.php
The text was updated successfully, but these errors were encountered: