@@ -13,7 +13,7 @@ import (
13
13
)
14
14
15
15
func GetPHPVersion () string {
16
- cmd := exec .Command ("php" , "-r" , "echo PHP_VERSION;" )
16
+ cmd := exec .Command ("php" , "-d" , "newrelic.daemon.dont_launch=3" , "- r" , "echo PHP_VERSION;" )
17
17
18
18
output , err := cmd .Output ()
19
19
if err != nil {
@@ -25,7 +25,7 @@ func GetPHPVersion() string {
25
25
}
26
26
27
27
func GetAgentVersion (agent_extension string ) string {
28
- cmd := exec .Command ("php" , "-d" , "extension=" + agent_extension , "-r" , "echo phpversion('newrelic');" )
28
+ cmd := exec .Command ("php" , "-d" , "newrelic.daemon.dont_launch=3" , "-d" , " extension="+ agent_extension , "-r" , "echo phpversion('newrelic');" )
29
29
30
30
output , err := cmd .Output ()
31
31
if err != nil {
@@ -36,7 +36,7 @@ func GetAgentVersion(agent_extension string) string {
36
36
37
37
func IsOPcacheLoaded (php_executable string ) bool {
38
38
fmt .Printf ("Checking if OPcache is loaded using %s\n " , php_executable )
39
- cmd := exec .Command (php_executable , "-m" )
39
+ cmd := exec .Command (php_executable , "-d" , "newrelic.daemon.dont_launch=3" , "- m" )
40
40
41
41
output , err := cmd .Output ()
42
42
0 commit comments