Skip to content

Commit

Permalink
config_file
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarbonneaux committed Nov 5, 2024
1 parent 6b960ce commit a267519
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zbx_php.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,14 @@ int load_php_env_config(void) {
{ NULL },
};
#endif
// CONFIG_FILE are populated a execution time with the default compiled path
// CONFIG_FILE/config_file are populated a execution time with the default compiled path
// (DEFAULT_CONFIG_FILE) or path set in zabbix commande line (with -c or --config)
// then get basepath and add zbx_php.cfg.
#if ZABBIX_VERSION_MAJOR >= 7
if ((ret=get_base_path_from_pathname(config_file,strlen(config_file),base_path,MAX_STRING_LEN))!=MCA_SUCCESS)
#else
if ((ret=get_base_path_from_pathname(CONFIG_FILE,strlen(CONFIG_FILE),base_path,MAX_STRING_LEN))!=MCA_SUCCESS)
#endif
{
zabbix_log( LOG_LEVEL_ERR, ZBX_MODULE "load_php_env_config get base path error : %d!!!!", ret);
return ZBX_MODULE_FAIL;
Expand Down

0 comments on commit a267519

Please sign in to comment.