Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Apache cannot load the newrelic.so file correctly but php -i on the command line shows otherwise

newrelic-daemon

#1

below is the log information from /var/log/newrelic/newrelic-daemon.log
2017/11/17 10:04:16.983632 (19917) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19917 ppid=17119 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:16.991858 (19923) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19923 ppid=1 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:17.000298 (19929) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19929 ppid=19923 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:17.000354 (19929) Info: increased file limit to 2048
2017/11/17 10:04:17.000444 (19929) Info: collector configuration is &{CAFile: CAPath: Proxy:}
2017/11/17 10:04:17.000697 (19929) Info: daemon listening on /tmp/.newrelic.sock
2017/11/17 10:04:23.983784 (19956) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19956 ppid=17119 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:23.995270 (19965) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19965 ppid=1 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:24.005681 (19972) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19972 ppid=19965 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:24.005724 (19972) Info: increased file limit to 2048
2017/11/17 10:04:24.005801 (19972) Info: collector configuration is &{CAFile: CAPath: Proxy:}
2017/11/17 10:04:24.006099 (19972) Info: daemon listening on /tmp/.newrelic.sock
2017/11/17 10:34:10.693731 (19972) Info: Reporting to: https://rpm.newrelic.com/accounts/470387/applications/93058867
2017/11/17 10:34:10.694016 (19972) Info: app ‘SES Application’ connected with run id ‘WzIse2E6MTA0MDg0OTUwNCxiOjkzMDU4ODY4LGM6NDcwMzg3LGQ6IjcuNi4wLjIwMSIsZToicGhwIixmOiJzZXMtYXBhY2hlLW5vZGUwMS5zY2ljb20ubXNjIixnOlt7YTo5MzA1ODg2NyxiOiJTRVMgQXBwbGljYXRpb24ifV19LDYzMTM1OTMxXQ’
**Take note that there is no log for php.
**my php -i show below info:

newrelic
New Relic RPM Monitoring => enabled
New Relic Version => 7.6.0.201 (“weber” - “cf3e11bb4908”)
Global Directives
Directive Name => Global Value
newrelic.daemon.app_timeout => no value
newrelic.daemon.auditlog => no value
newrelic.daemon.collector_host => collector.newrelic.com
newrelic.daemon.dont_launch => no value
newrelic.daemon.location => /usr/bin/newrelic-daemon
newrelic.daemon.logfile => /var/log/newrelic/newrelic-daemon.log
newrelic.daemon.loglevel => no value
newrelic.daemon.pidfile => no value
newrelic.daemon.port => /tmp/.newrelic.sock
newrelic.daemon.proxy => no value
newrelic.daemon.ssl => enabled
newrelic.daemon.ssl_ca_bundle => no value
newrelic.daemon.ssl_ca_path => no value
newrelic.daemon.utilization.detect_aws => enabled
newrelic.daemon.utilization.detect_azure => enabled
newrelic.daemon.utilization.detect_docker => enabled
newrelic.daemon.utilization.detect_gcp => enabled
newrelic.daemon.utilization.detect_pcf => enabled
newrelic.feature_flag => no value
newrelic.high_security => 0
newrelic.logfile => /var/log/newrelic/php_agent.log
newrelic.loglevel => info
newrelic.transaction_tracer.internal_functions_enabled => disabled
Per-Directory Directives
Directive Name => Local/Active Value => Master/Default Value
newrelic.analytics_events.capture_attributes => enabled => enabled
newrelic.analytics_events.enabled => enabled => enabled
newrelic.appname => SES Application => SES Application
newrelic.attributes.enabled => enabled => enabled
newrelic.attributes.exclude => no value => no value
newrelic.attributes.include => no value => no value
newrelic.browser_monitoring.attributes.enabled => disabled => disabled
newrelic.browser_monitoring.attributes.exclude => no value => no value
newrelic.browser_monitoring.attributes.include => no value => no value
newrelic.browser_monitoring.auto_instrument => enabled => enabled
newrelic.browser_monitoring.capture_attributes => disabled => disabled
newrelic.browser_monitoring.debug => disabled => disabled
newrelic.browser_monitoring.loader => rum => rum
newrelic.capture_params => off => off
newrelic.cross_application_tracer.enabled => enabled => enabled
newrelic.custom_insights_events.enabled => enabled => enabled
newrelic.datastore_tracer.database_name_reporting.enabled => enabled => enabled
newrelic.datastore_tracer.instance_reporting.enabled => enabled => enabled
newrelic.enabled => yes => yes
newrelic.error_collector.attributes.enabled => enabled => enabled
newrelic.error_collector.attributes.exclude => no value => no value
newrelic.error_collector.attributes.include => no value => no value
newrelic.error_collector.capture_attributes => enabled => enabled
newrelic.error_collector.capture_events => enabled => enabled
newrelic.error_collector.enabled => enabled => enabled
newrelic.error_collector.ignore_errors => no value => no value
newrelic.error_collector.ignore_exceptions => no value => no value
newrelic.error_collector.ignore_user_exception_handler => no => no
newrelic.error_collector.prioritize_api_errors => no => no
newrelic.error_collector.record_database_errors => yes => yes
newrelic.framework => auto-detect => auto-detect
newrelic.framework.drupal.modules => on => on
newrelic.framework.wordpress.hooks => on => on
newrelic.guzzle.enabled => 1 => 1
newrelic.ignored_params => no value => no value
newrelic.labels => no value => no value
newrelic.license => e2…57 => e2…57
newrelic.phpunit_events.enabled => disabled => disabled
newrelic.process_host.display_name => no value => no value
newrelic.special.max_nesting_level => -1 => -1
newrelic.synthetics.enabled => enabled => enabled
newrelic.transaction_events.attributes.enabled => enabled => enabled
newrelic.transaction_events.attributes.exclude => no value => no value
newrelic.transaction_events.attributes.include => no value => no value
newrelic.transaction_events.enabled => enabled => enabled
newrelic.transaction_tracer.attributes.enabled => enabled => enabled
newrelic.transaction_tracer.attributes.exclude => no value => no value
newrelic.transaction_tracer.attributes.include => no value => no value
newrelic.transaction_tracer.capture_attributes => enabled => enabled
newrelic.transaction_tracer.custom => no value => no value
newrelic.transaction_tracer.detail => 1 => 1
newrelic.transaction_tracer.enabled => enabled => enabled
newrelic.transaction_tracer.explain_enabled => enabled => enabled
newrelic.transaction_tracer.explain_threshold => 500 => 500
newrelic.transaction_tracer.gather_input_queries => 1 => 1
newrelic.transaction_tracer.record_sql => obfuscated => obfuscated
newrelic.transaction_tracer.slow_sql => enabled => enabled
newrelic.transaction_tracer.stack_trace_threshold => 500 => 500
newrelic.transaction_tracer.threshold => apdex_f => apdex_f
newrelic.webtransaction.name.files => no value => no value
newrelic.webtransaction.name.functions => no value => no value
newrelic.webtransaction.name.remove_trailing_path => no => no

===

I can run any php file which data are reporting to new relic dashboard as normal but nothing being reported from my Apache web server, where my system is running.

I need help on how to make sure, newrelic.so can be loaded from apache and it can send the data for reporting.

Appreciate any assistance on this .

Thank you.


Apache cannot load the newrelic.so file but php -i shows otherwise
#2

below is the log information from /var/log/newrelic/newrelic-daemon.log
2017/11/17 10:04:16.983632 (19917) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19917 ppid=17119 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:16.991858 (19923) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19923 ppid=1 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:17.000298 (19929) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19929 ppid=19923 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:17.000354 (19929) Info: increased file limit to 2048
2017/11/17 10:04:17.000444 (19929) Info: collector configuration is &{CAFile: CAPath: Proxy:}
2017/11/17 10:04:17.000697 (19929) Info: daemon listening on /tmp/.newrelic.sock
2017/11/17 10:04:23.983784 (19956) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19956 ppid=17119 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:23.995270 (19965) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19965 ppid=1 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:24.005681 (19972) Info: New Relic daemon version 7.6.0.201-cf3e11bb4908 [listen="/tmp/.newrelic.sock" ssl=enabled startup=init pid=19972 ppid=19965 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=8 GOOS=linux GOARCH=amd64]
2017/11/17 10:04:24.005724 (19972) Info: increased file limit to 2048
2017/11/17 10:04:24.005801 (19972) Info: collector configuration is &{CAFile: CAPath: Proxy:}
2017/11/17 10:04:24.006099 (19972) Info: daemon listening on /tmp/.newrelic.sock
2017/11/17 10:34:10.693731 (19972) Info: Reporting to: https://rpm.newrelic.com/accounts/470387/applications/93058867
2017/11/17 10:34:10.694016 (19972) Info: app ‘SES Application’ connected with run id ‘WzIse2E6MTA0MDg0OTUwNCxiOjkzMDU4ODY4LGM6NDcwMzg3LGQ6IjcuNi4wLjIwMSIsZToicGhwIixmOiJzZXMtYXBhY2hlLW5vZGUwMS5zY2ljb20ubXNjIixnOlt7YTo5MzA1ODg2NyxiOiJTRVMgQXBwbGljYXRpb24ifV19LDYzMTM1OTMxXQ’
**Take note that there is no log for php.
**my php -i show below info:

newrelic
New Relic RPM Monitoring => enabled
New Relic Version => 7.6.0.201 (“weber” - “cf3e11bb4908”)
Global Directives
Directive Name => Global Value
newrelic.daemon.app_timeout => no value
newrelic.daemon.auditlog => no value
newrelic.daemon.collector_host => collector.newrelic.com
newrelic.daemon.dont_launch => no value
newrelic.daemon.location => /usr/bin/newrelic-daemon
newrelic.daemon.logfile => /var/log/newrelic/newrelic-daemon.log
newrelic.daemon.loglevel => no value
newrelic.daemon.pidfile => no value
newrelic.daemon.port => /tmp/.newrelic.sock
newrelic.daemon.proxy => no value
newrelic.daemon.ssl => enabled
newrelic.daemon.ssl_ca_bundle => no value
newrelic.daemon.ssl_ca_path => no value
newrelic.daemon.utilization.detect_aws => enabled
newrelic.daemon.utilization.detect_azure => enabled
newrelic.daemon.utilization.detect_docker => enabled
newrelic.daemon.utilization.detect_gcp => enabled
newrelic.daemon.utilization.detect_pcf => enabled
newrelic.feature_flag => no value
newrelic.high_security => 0
newrelic.logfile => /var/log/newrelic/php_agent.log
newrelic.loglevel => info
newrelic.transaction_tracer.internal_functions_enabled => disabled
Per-Directory Directives
Directive Name => Local/Active Value => Master/Default Value
newrelic.analytics_events.capture_attributes => enabled => enabled
newrelic.analytics_events.enabled => enabled => enabled
newrelic.appname => SES Application => SES Application
newrelic.attributes.enabled => enabled => enabled
newrelic.attributes.exclude => no value => no value
newrelic.attributes.include => no value => no value
newrelic.browser_monitoring.attributes.enabled => disabled => disabled
newrelic.browser_monitoring.attributes.exclude => no value => no value
newrelic.browser_monitoring.attributes.include => no value => no value
newrelic.browser_monitoring.auto_instrument => enabled => enabled
newrelic.browser_monitoring.capture_attributes => disabled => disabled
newrelic.browser_monitoring.debug => disabled => disabled
newrelic.browser_monitoring.loader => rum => rum
newrelic.capture_params => off => off
newrelic.cross_application_tracer.enabled => enabled => enabled
newrelic.custom_insights_events.enabled => enabled => enabled
newrelic.datastore_tracer.database_name_reporting.enabled => enabled => enabled
newrelic.datastore_tracer.instance_reporting.enabled => enabled => enabled
newrelic.enabled => yes => yes
newrelic.error_collector.attributes.enabled => enabled => enabled
newrelic.error_collector.attributes.exclude => no value => no value
newrelic.error_collector.attributes.include => no value => no value
newrelic.error_collector.capture_attributes => enabled => enabled
newrelic.error_collector.capture_events => enabled => enabled
newrelic.error_collector.enabled => enabled => enabled
newrelic.error_collector.ignore_errors => no value => no value
newrelic.error_collector.ignore_exceptions => no value => no value
newrelic.error_collector.ignore_user_exception_handler => no => no
newrelic.error_collector.prioritize_api_errors => no => no
newrelic.error_collector.record_database_errors => yes => yes
newrelic.framework => auto-detect => auto-detect
newrelic.framework.drupal.modules => on => on
newrelic.framework.wordpress.hooks => on => on
newrelic.guzzle.enabled => 1 => 1
newrelic.ignored_params => no value => no value
newrelic.labels => no value => no value
newrelic.license => e2…57 => e2…57
newrelic.phpunit_events.enabled => disabled => disabled
newrelic.process_host.display_name => no value => no value
newrelic.special.max_nesting_level => -1 => -1
newrelic.synthetics.enabled => enabled => enabled
newrelic.transaction_events.attributes.enabled => enabled => enabled
newrelic.transaction_events.attributes.exclude => no value => no value
newrelic.transaction_events.attributes.include => no value => no value
newrelic.transaction_events.enabled => enabled => enabled
newrelic.transaction_tracer.attributes.enabled => enabled => enabled
newrelic.transaction_tracer.attributes.exclude => no value => no value
newrelic.transaction_tracer.attributes.include => no value => no value
newrelic.transaction_tracer.capture_attributes => enabled => enabled
newrelic.transaction_tracer.custom => no value => no value
newrelic.transaction_tracer.detail => 1 => 1
newrelic.transaction_tracer.enabled => enabled => enabled
newrelic.transaction_tracer.explain_enabled => enabled => enabled
newrelic.transaction_tracer.explain_threshold => 500 => 500
newrelic.transaction_tracer.gather_input_queries => 1 => 1
newrelic.transaction_tracer.record_sql => obfuscated => obfuscated
newrelic.transaction_tracer.slow_sql => enabled => enabled
newrelic.transaction_tracer.stack_trace_threshold => 500 => 500
newrelic.transaction_tracer.threshold => apdex_f => apdex_f
newrelic.webtransaction.name.files => no value => no value
newrelic.webtransaction.name.functions => no value => no value
newrelic.webtransaction.name.remove_trailing_path => no => no

Appreciate any help on this. Thank you.


#3

Hey there, I see that you posted this twice, @jalis.mahmud! I went ahead and merged them together so we can get you a streamlined answer here.


#4

Thank you Linds, Any idea what went wrong, How could I ensure my apache reads/loads the same php and its modules? and how could I fix it? would appreciate some fruitful guidance.

I have downloaded the php new relic agent from here: https://download.newrelic.com/php_agent/release/newrelic-php5-7.6.0.201-linux.tar.gz


#5

Anyone here, can provide me any sort of support ? Thanks


#6

Based on your php-i it looks like New Relic is configured correctly for the command line. So far so good! To check if the New Relic module is loaded in Apache’s PHP, create a phpinfo page (just a .php page with <?php phpinfo(); ?> ) in the same directory as your site. This page will load the same info as the command line php -i but it will show us how PHP is loading for that directory as it can sometimes be different even between different directories in the same website.

Without seeing your phpinfo page, my guess it that since the command line is working correctly you might be using mod_php with a threaded Apache mpm such as mpm_event. This configuration isn’t compatible with New Relic and if this is the case you’ll see an error in the New Relic section of your phpinfo page. To fix this you’ll either need to switch to mpm_prefork or switch to a different PHP handler for Apache such as FPM.

But that is just my guess, the phpinfo page will tell you more. It could be loading a different config file from your command line or even using a different PHP install that doesn’t have New Relic installed on it.