我正在我的mac os中安装vtiger。
访问index.php
Notice: Undefined variable: mod_strings in /Applications/XAMPP/xamppfiles/htdocs/vtigercrm/modules/CustomView/CustomView.php on line 17
因此错误清楚地表明存在未识别的变量mod_strings
。
我去了index.php
,我发现了这个:
include_once 'include/Webservices/Relation.php';
include_once 'vtlib/Vtiger/Module.php';
include_once 'includes/main/WebUI.php';
$webUI = new Vtiger_WebUI();
$webUI->process(new Vtiger_Request($_REQUEST, $_REQUEST));
如您所见,错误告诉我该变量位于CustomView.php
。所以我打开了那个文件,发现了以下内容:
require_once('data/CRMEntity.php');
require_once('include/utils/utils.php');
require_once 'include/Webservices/Utils.php';
如您所见,代码使用名为CRMEntity
的php脚本,我打开了该文件,我发现了这个:
global $adb, $mod_strings;
所以看那里的变量 IS 。为什么我会收到这个错误?
答案 0 :(得分:0)
根据系统要求here,您应该将php.ini配置为以下内容:
error_reporting E_WARNING& ~E_NOTICE& 〜E_DEPRECATED
上的display_errors检查phpinfo()正在使用的php.ini的位置并对其应用更改,然后重新启动服务器并测试
答案 1 :(得分:0)
很抱歉迟到的回复,我正在尝试安装vTiger并且我遇到了同样的错误,你给了我很好的提示,就像你说的那样,$mod_strings
在global
被声明为CRMEntity.php
{1}} sp为了解决这个问题,只需将其添加到CustomView.php
中的全局声明中,如下所示:
require_once 'data/CRMEntity.php';
require_once 'include/utils/utils.php';
require_once 'include/Webservices/Utils.php';
// add $mod_strings
global $adv_filter_options, $mod_strings;
// the rest of the code ...
$adv_filter_options = array("e" => "" . $mod_strings['equals'] . "",
// ...
您可能还需要隐藏错误才能看到安装页面(您无法纠正所有错误,您可能希望开发自己的CRM很多)
在顶部的"vtigercrm\include\logging.php"
添加以下内容
// hide errors
ini_set('display_errors', '0');
// but log them
error_reporting(e_all | e_strict);