Results 1 to 6 of 6

Thread: Fatal error: Cannot redeclare class Tracker

  1. #1
    publisirius is offline Junior Member
    Join Date
    Feb 2009
    Posts
    1

    Exclamation Fatal error: Cannot redeclare class Tracker

    Hello!
    I just installed SugarCRM and everything seems to work smoothly even after I installed another language pack.
    Except for one detail:
    When I am using the Portuguese language Pack (i am trying the second language pack now) and I try to delete the selected tasks, it returns me the following error (take a look at the attachments for detail):

    Bad data passed in; Return to Home
    Fatal error: Cannot redeclare class Tracker in C:\xampp\htdocs\crm\modules\Trackers\Tracker.php on line 45

    When I use the en_us language pack, the problem do not happens.

    I even tried uninstall e reinstall SugarCRM but the problem persists.

    Do you guys have a clue about why is this happening?

    Thank you very much!

    Luciano

    My enviroment:
    SugarCRM v. 5.2

    -------------------------------------

    i have the same problem... any?

  2. #2
    synoy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    33

    Default Re: Fatal error: Cannot redeclare class Tracker

    Hi

    I was also facing the same problm in tracker...........

    go to admin->tracker settings...............disable tracker...........this is not the onl;y thing....again
    comment all the tracker classes or functions anywhere starting from scheduler.php in modules/schedulers....

    I can assure u that u wont get that error (redeclere tracker class)....but u must get "bad data passed " error..........

    i am also searching to resolve that bad data pased error.........

    If u find plz let me know..........


    Thanx

  3. #3
    JDS13 is offline Junior Member
    Join Date
    Feb 2009
    Posts
    2

    Default Re: Fatal error: Cannot redeclare class Tracker

    I also get the "Cannot redeclare class Tracker" message.

    How do you disable the Tracker?

    System -> Tracker Settings is titled "Enable/Disable tracking", but in the "Tracker Settings:" panel "Enable" is text, not a selectable option.

    Thank you.

  4. #4
    dsuvankar is offline Sugar Community Member
    Join Date
    Sep 2008
    Posts
    187

    Default Re: Fatal error: Cannot redeclare class Tracker

    Hi,
    May be the problem in include/language/<your_language_file>
    Mapping of modules with the language not ok.
    you have to make sure language are mapped correctly.
    suppose I want to change Calls to My Calls then I have to map like
    'Calls' => 'My Calls'

    in case of you

    '<module_ name>' => '<Portuguese_term>'

    Hope this will help you.

  5. #5
    Semeyon is offline Junior Member
    Join Date
    Apr 2009
    Posts
    1

    Default Re: Fatal error: Cannot redeclare class Tracker

    I have found (create) solution.
    Open “include/utils.php” and search:

    PHP Code:
    function clean_string($str$filter "STANDARD") {
        global  
    $sugar_config;

        
    $filters = Array(
        
    "STANDARD"        => "#[^A-Z0-9\-_\.\@]#i",
        
    "STANDARDSPACE"   => "#[^A-Z0-9\-_\.\@\ ]#i",
        
    "FILE"            => "#[^A-Z0-9\-_\.]#i",
        
    "NUMBER"          => "#[^0-9\-]#i",
        
    "SQL_COLUMN_LIST" => "#[^A-Z0-9,_\.]#i",
        
    "PATH_NO_URL"     => "#://#i",
        
    "SAFED_GET"          => "#[^A-Z0-9\@\=\&\?\.\/\-_~]#i"/* range of allowed characters in a GET string */
        
    "UNIFIED_SEARCH"    => "#[\\x00]#"/* cn: bug 3356 & 9236 - MBCS search strings */
        
    "AUTO_INCREMENT"    => "#[^0-9\-,\ ]#i",
        
    "ALPHANUM"        => "#[^A-Z0-9\-]#i",
        );

        if (
    preg_match($filters[$filter], $str)) {
            if (isset(
    $GLOBALS['log']) && is_object($GLOBALS['log'])) {
                
    $GLOBALS['log']->fatal("SECURITY: bad data passed in; string: {$str}");
            }
            die(
    "Bad data passed in; <a href=\"{$sugar_config['site_url']}\">Return to Home</a>");
        }
        else {
            return 
    $str;
        }

    Then add to $filter this:

    PHP Code:
        "SAFED_PATH"      => "#[^A-Z0-9\:\\\@\=\&\?\.\/\-_~]#i"
    After that? finde( function clean_special_arguments should be right after function clean_string):
    PHP Code:
    function clean_special_arguments() {

        if(isset(
    $_SERVER['PHP_SELF'])) {
            if (!empty(
    $_SERVER['PHP_SELF'])) clean_string($_SERVER['PHP_SELF'], 'SAFED_PATH');
        }
        if (!empty(
    $_REQUEST) && !empty($_REQUEST['login_theme'])) clean_string($_REQUEST['login_theme'], "STANDARD");
        if (!empty(
    $_REQUEST) && !empty($_REQUEST['ck_login_theme_20'])) clean_string($_REQUEST['ck_login_theme_20'], "STANDARD");
        if (!empty(
    $_SESSION) && !empty($_SESSION['authenticated_user_theme'])) clean_string($_SESSION['authenticated_user_theme'], "STANDARD");
        if (!empty(
    $_REQUEST) && !empty($_REQUEST['module_name'])) clean_string($_REQUEST['module_name'], "STANDARD");
        if (!empty(
    $_REQUEST) && !empty($_REQUEST['module'])) clean_string($_REQUEST['module'], "STANDARD");
        if (!empty(
    $_POST) && !empty($_POST['parent_type'])) clean_string($_POST['parent_type'], "STANDARD");
        if (!empty(
    $_REQUEST) && !empty($_REQUEST['mod_lang'])) clean_string($_REQUEST['mod_lang'], "STANDARD");
        if (!empty(
    $_SESSION) && !empty($_SESSION['authenticated_user_language'])) clean_string($_SESSION['authenticated_user_language'], "STANDARD");
        if (!empty(
    $_SESSION) && !empty($_SESSION['dyn_layout_file'])) clean_string($_SESSION['dyn_layout_file'], "PATH_NO_URL");
        if (!empty(
    $_GET) && !empty($_GET['from'])) clean_string($_GET['from']);
        if (!empty(
    $_GET) && !empty($_GET['gmto'])) clean_string($_GET['gmto'], "NUMBER");
        if (!empty(
    $_GET) && !empty($_GET['case_number'])) clean_string($_GET['case_number'], "AUTO_INCREMENT");
        if (!empty(
    $_GET) && !empty($_GET['bug_number'])) clean_string($_GET['bug_number'], "AUTO_INCREMENT");
        if (!empty(
    $_GET) && !empty($_GET['quote_num'])) clean_string($_GET['quote_num'], "AUTO_INCREMENT");
        
    clean_superglobals('stamp''ALPHANUM'); // for vcr controls
        
    clean_superglobals('offset''ALPHANUM');
        
    clean_superglobals('return_action');
        
    clean_superglobals('return_module');
        return 
    TRUE;

    Finde here this string:
    PHP Code:
    if (!empty($_SERVER['PHP_SELF'])) clean_string($_SERVER['PHP_SELF'], 'SAFED_GET'); 
    And replace it with this:
    PHP Code:
    if (!empty($_SERVER['PHP_SELF'])) clean_string($_SERVER['PHP_SELF'], 'SAFED_PATH'); 
    Tested on SugarCRm 5.2e CE on MS Windows + Apache 2.2.11 + MOD_PHP + PHP 5.2.9-2

    Good luck!

  6. #6
    glyquiroz is offline Member
    Join Date
    Mar 2009
    Posts
    11

    Default Re: Fatal error: Cannot redeclare class Tracker

    Hi,

    I had the same message also, I realized that for some reason there was a semicolon (
    in the ID field of the record that was retrieving the error, by removing this from the field ID value (in both table and table_cstm), everything returned
    to normality

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 2009-03-26, 03:12 AM
  2. Cannot redeclare class Tracker Error
    By cebula in forum Help
    Replies: 1
    Last Post: 2008-11-13, 01:44 PM
  3. Replies: 1
    Last Post: 2008-05-19, 10:37 PM
  4. New Install - Fatal error: Cannot redeclare class user
    By csiddall in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2007-04-14, 07:14 PM
  5. Fatal error: Cannot redeclare class soapclient
    By preginald in forum Web Self Service Portal
    Replies: 0
    Last Post: 2007-04-12, 01:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •