AnsweredAssumed Answered

How do I include file config.php/config_override.php in logic hook ?

Question asked by Autchara Chaiprom on Jul 13, 2016
Latest reply on Jul 18, 2016 by Autchara Chaiprom

I saw some error in log

PHP Warning:  include(../config_override.php): failed to open stream: No such file or directory in /var/www/sugarcrm/htdocs/custom/users_hooks.php on line 3

PHP Warning:  include(): Failed opening '../config_override.php' for inclusion (include_path='/var/www/sugarcrm/htdocs:/var/www/sugarcrm/htdocs/vendor:.:/usr/share/php:/usr/share/pear') in /var/www/sugarcrm/htdocs/custom/users_hooks.php on line 3

 

then I edit

//from

include('../config_override.php');
//to
include('config_override.php');

error has gone

 

my file hook is in ./custom

<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
include('config_override.php');
...

 

when I try this

$GLOBALS['log']->fatal($sugar_config['domain']);

 

no value shown

 

What can I do or I do something wrong ?

 

Sugar 7.6 Ent

Thanks,

M

Outcomes