Skip to content

Commit a267519

Browse files
committed
config_file
1 parent 6b960ce commit a267519

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

zbx_php.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,14 @@ int load_php_env_config(void) {
123123
{ NULL },
124124
};
125125
#endif
126-
// CONFIG_FILE are populated a execution time with the default compiled path
126+
// CONFIG_FILE/config_file are populated a execution time with the default compiled path
127127
// (DEFAULT_CONFIG_FILE) or path set in zabbix commande line (with -c or --config)
128128
// then get basepath and add zbx_php.cfg.
129+
#if ZABBIX_VERSION_MAJOR >= 7
130+
if ((ret=get_base_path_from_pathname(config_file,strlen(config_file),base_path,MAX_STRING_LEN))!=MCA_SUCCESS)
131+
#else
129132
if ((ret=get_base_path_from_pathname(CONFIG_FILE,strlen(CONFIG_FILE),base_path,MAX_STRING_LEN))!=MCA_SUCCESS)
133+
#endif
130134
{
131135
zabbix_log( LOG_LEVEL_ERR, ZBX_MODULE "load_php_env_config get base path error : %d!!!!", ret);
132136
return ZBX_MODULE_FAIL;

0 commit comments

Comments
 (0)