Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documented open_basedir limitation and logging if boostrapper path doesn't comply that limitation #1044

Merged

Conversation

intuibase
Copy link
Contributor

It will produce output like this for default log level.

[Elastic APM PHP Tracer] 2023-08-23 14:38:12.223397+02:00 [PID: 268995] [TID: 268995] [WARNING]  [Lifecycle] [lifecycle.cpp:558] [elasticApmModuleInit] Elastic Agent bootstrap file (/home/paplo/sources/apm-agent-php/agent/php/bootstrap_php_part.php) is located outside of paths allowed by open_basedir ini setting. Read more details here https://www.elastic.co/guide/en/apm/agent/php/current/setup.html
PHP Warning:  PHP Request Startup: open_basedir restriction in effect. File(/home/paplo/sources/apm-agent-php/agent/php/bootstrap_php_part.php) is not within the allowed path(s): (/var/www/html/dupa) in Unknown on line 0
[Elastic APM PHP Tracer] 2023-08-23 14:38:12.226372+02:00 [PID: 268995] [TID: 268995] [ERROR]    [Util] [util_for_PHP.cpp:94] [loadPhpFile] php_stream_open_for_zend_ex() failed. Return value: -1. phpFilePath: `/home/paplo/sources/apm-agent-php/agent/php/bootstrap_php_part.php'
[Elastic APM PHP Tracer] 2023-08-23 14:38:12.226396+02:00 [PID: 268995] [TID: 268995] [ERROR]    [Util] [util_for_PHP.cpp:44] [logDiagnostics_for_failed_php_stream_open_for_zend_ex] Diagnostics for failed php_stream_open_for_zend_ex(): fopen("/home/paplo/sources/apm-agent-php/agent/php/bootstrap_php_part.php", "r") returned non-NULL value
[Elastic APM PHP Tracer] 2023-08-23 14:38:12.226409+02:00 [PID: 268995] [TID: 268995] [ERROR]    [Util] [util_for_PHP.cpp:171] [loadPhpFile] Exiting...; resultCode: resultFailure (6); 
[Elastic APM PHP Tracer] 2023-08-23 14:38:12.226415+02:00 [PID: 268995] [TID: 268995] [ERROR]    [C-to-PHP] [tracer_PHP_part.cpp:90] [switchTracerPhpPartStateToFailed] Switching tracer PHP part state to failed; reason: Failed to bootstrap tracer PHP part, current state: tracerPhpPartState_before_bootstrap, called from bootstrapTracerPhpPart
[Elastic APM PHP Tracer] 2023-08-23 14:38:12.226425+02:00 [PID: 268995] [TID: 268995] [ERROR]    [C-to-PHP] [tracer_PHP_part.cpp:155] [bootstrapTracerPhpPart] Exiting...; resultCode: resultFailure (6); 
[Elastic APM PHP Tracer] 2023-08-23 14:38:12.226431+02:00 [PID: 268995] [TID: 268995] [ERROR]    [Lifecycle] [lifecycle.cpp:758] [elasticApmRequestInit] Exiting...; resultCode: resultFailure (6); 
...
[Elastic APM PHP Tracer] 2023-08-23 14:38:12.226747+02:00 [PID: 268995] [TID: 268995] [ERROR]    [C-to-PHP] [tracer_PHP_part.cpp:184] [shutdownTracerPhpPart] Exiting...; resultCode: resultFailure (6); 

@intuibase intuibase merged commit c8bd1ab into elastic:main Aug 30, 2023
144 checks passed
@intuibase intuibase deleted the 909_document_open_basedir_limitation branch August 30, 2023 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants