Results 1 to 9 of 9

Thread: SugarOS-4.5.1c Installation ERROR

  1. #1
    hazen is offline Junior Member
    Join Date
    May 2007
    Posts
    1

    Default SugarOS-4.5.1c Installation ERROR

    Good Day All:
    LAMP Based install from source, other LAMP applicaitons functionaing properly.
    Gentoo Linux
    Apache 2.x
    PHP 5.2.1
    Mysql 5.x

    Unpacked the source under the htdoc directory, the install.php runs all the way till step

    Heres the install check:

    Component Status
    PHP Version Unsupported PHP Version Installed: ( ver 5.2.1-pl3-gentoo )
    MySQL Database OK
    MB Strings Module OK
    XML Parsing OK
    PHP Safe Mode Turned Off OK
    PHP Allow Call Time Pass Reference Turned Off Allow Call Time Pass Reference is On (this should be set to Off in php.ini)
    PHP Memory Limit >= 32M OK (128M)
    Writable SugarCRM Configuration File (config.php) OK
    Writable Custom Directory OK
    Writable Modules Sub-Directories and Files OK
    Writable Data Sub-Directories OK
    Writable Cache Sub-Directories OK
    Writable Session Save Path (/tmp) OK
    Optional Components Status
    IMAP Module OK
    cURL Module OK
    ZLIB Compression Module OK
    Note: Your php configuration file (php.ini) is located at:
    /etc/php/apache2-php5/php.ini

    And here is the last step it runs before it fails (Step 7):

    Creating Sugar application tables, audit tables, and relationship metadata...

    relationships... dropping / creating / relationship meta ... done
    acl_roles... dropping / creating / relationship meta ... done
    acl_actions... dropping / creating / relationship meta ... done
    leads... dropping / creating / audit table / relationship meta ... done
    contacts... dropping / creating / audit table / relationship meta ... done
    accounts... dropping / creating / audit table / relationship meta ... done
    opportunities... dropping / creating / audit table / relationship meta ... done
    cases... dropping / creating / audit table / relationship meta ... done
    notes... dropping / creating / relationship meta ... done
    email_templates... dropping / creating / relationship meta ... done
    emailman... dropping / creating / relationship meta ... done
    calls... dropping / creating / relationship meta ... done
    emails... dropping / creating / relationship meta ... done
    meetings... dropping / creating / relationship meta ... done
    iframes... dropping / creating / relationship meta ... done
    tasks... dropping / creating / relationship meta ... done
    users... dropping / creating / relationship meta ... done
    currencies... dropping / creating / relationship meta ... done
    tracker... dropping / creating / relationship meta ... done
    import_maps... dropping / creating / relationship meta ... done
    files... dropping / creating / relationship meta ... done
    users_last_import... dropping / creating / relationship meta ... done
    config... dropping / creating / relationship meta ... done
    upgrade_history... dropping / creating / relationship meta ... done
    vcals... dropping / creating / relationship meta ... done
    bugs... dropping / creating / audit table / relationship meta ... done
    versions... dropping / creating / relationship meta ... done
    releases... dropping / creating / relationship meta ... done
    feeds... dropping / creating / relationship meta ... done
    project... dropping / creating / relationship meta ... done
    project_task... dropping / creating / audit table / relationship meta ... done
    roles... dropping / creating / relationship meta ... done
    email_marketing... dropping / creating / relationship meta ... done
    campaigns... dropping / creating / audit table / relationship meta ... done
    prospect_lists... dropping / creating / relationship meta ... done
    prospects... dropping / creating / relationship meta ... done
    documents... dropping / creating / relationship meta ... done
    document_revisions... dropping / creating / relationship meta ... done
    fields_meta_data... dropping / creating / relationship meta ... done
    schedulers... dropping / creating / relationship meta ... done
    schedulers_times... dropping / creating / relationship meta ... done
    inbound_email... dropping / creating / relationship meta ... done
    campaign_log... dropping / creating / relationship meta ... done
    dashboards... dropping / creating / relationship meta ... done
    campaign_trkrs... dropping / creating / relationship meta ... done
    saved_search... dropping / creating / relationship meta ... done
    user_preferences... dropping / creating / relationship meta ... done

    Creating Sugar relationship tables

    inboundemail_autoreply... done
    usersignature... done
    accounts_bugs... done
    accounts_cases... done
    accounts_contacts... done
    accounts_opportunities... done
    acl_roles_actions... done
    acl_roles_users... done
    calls_contacts... done
    calls_users... done
    cases_bugs... done
    contacts_bugs... done
    contacts_cases... done
    contacts_users... done
    custom_fields... done
    email_marketing_prospect_lists... done
    emails_accounts... done
    emails_bugs... done
    emails_cases... done
    emails_contacts... done
    emails_leads... done
    emails_opportunities... done
    emails_project_task... done
    emails_projects... done
    emails_prospects... done
    emails_tasks... done
    emails_users... done
    linked_documents... done
    meetings_contacts... done
    meetings_users... done
    opportunities_contacts... done
    project_relation... done
    prospect_list_campaigns... done
    prospect_lists_prospects... done
    roles_modules... done
    roles_users... done
    tracker... done
    users_feeds... done

    Creating default Sugar data

    Inserting default settings... done
    Creating default users... done
    Creating default scheduler jobs... done

    The setup of Sugar 4.5.1c is now complete.
    Total time: 2.012257 seconds.
    Approximate memory used: 24955224 bytes.


    Any help would be appreciated, and I would like to know if I may aid in the release of an Ebuild for Gentoo users, following step number seven the folling error is displayed:
    Here is the Location:
    http://localhost/sugarcrm/install.php
    And here is the error:
    Parse error: syntax error, unexpected $end in /var/www/localhost/htdocs/sugarcrm/config.php on line 240

    And here is line 235 to 240 of config.php
    array (
    0 => 'php',
    1 => 'php3',
    2 => 'php4',
    3 => 'php5',
    4 => 'pl',
    5 => 'cgi',
    6 => 'py',
    7 => 'asp',
    8 => 'cfm',
    9 => 'js',
    10 => 'vbs',
    11 => 'html',
    12 => 'htm',
    ),
    'upload_dir' => 'cache/upload/',
    'upload_maxsize' => 3000000,
    'use_php_code_json' => true,
    'verify_client_ip' =>

    My first suspician is that there is no "?>" end quote for PHP, is this an oversight of some kind?
    Last edited by hazen; 2007-05-03 at 01:10 PM.

  2. #2
    sanjaykatiyar1's Avatar
    sanjaykatiyar1 is offline Sugar Community Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    600

    Default Re: SugarOS-4.5.1c Installation ERROR

    I assume your sugar installation is completed.
    Just change config.php file like this:

    'verify_client_ip' => true,
    );
    ?>
    Sanjay Katiyar
    iPhone and Android solutions http://www.apptility.com

  3. #3
    Kalendrinn is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    200

    Default Re: SugarOS-4.5.1c Installation ERROR

    That worked for me, thank you. I figured that was the case but there is no telling exactly how much of the config is getting left out, so I didn't just want to close it off and be done with it. Can a SugarCRM Team Member have this issue resolved in the next patch? It appears in both the 4.5.1d and 4.5.1e versions. Also, can a team member (or someone) tell me if there's anything else missing after that line of the config?

    My server:
    IIS - 6
    MySQL - 5.0
    PHP - 5.1.6
    Windows - 2k3

    Thanks,

    -NB

  4. #4
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: SugarOS-4.5.1c Installation ERROR

    Hello Kalendrinn,

    I haven't been able to reproduce this problem on any of the versions you specified-- I have a feeling the problem is specific to your environment.

    First off, verify_client_ip is the last entry in config.php, so you're not missing any configuration directives currently.

    To help diagnose this problem, I'm hoping you can test something out for me. Unzip another copy of Sugar (any version that has this problem), but before you install it, make these changes:

    1) create a file named config.log in the main Sugar directory. Make sure this file is writable by your webserver user
    2) open the ./include/utils/file_utils.php file and find these lines:

    PHP Code:
    function write_array_to_file( $the_name, $the_array, $the_file )
    {
        $the_string =   "<?phpn" .
                        '// created: ' . date('Y-m-d H:i:s') . "
    n" .
                        "
    $$the_name " .
                        var_export_helper( $the_array ) .
                        "
    ;n?>\n";

        if( $fh = @fopen( $the_file, "w" ) )
        {
            fputs( $fh, $the_string, strlen($the_string) );
            fclose( $fh );
            return( true );
        }
        else
        {
            return( false );
        }
    }
    Remove all the above lines and replace them with this:

    PHP Code:
    function write_array_to_file( $the_name, $the_array, $the_file )
    {
        $the_string =   "<?phpn" .
                        '// created: ' . date('Y-m-d H:i:s') . "
    n" .
                        "
    $$the_name " .
                        var_export_helper( $the_array ) .
                        "
    ;n?>\n";

        // BEGIN jostrow customization
        if ($the_name == 'sugar_config') {
            $fp = fopen('config.log', 'ab');
            fwrite($fp, date('Y-m-d H:i:s') . ' contents of sugar_config: ' . var_export($the_string, TRUE) . "\n");
        }
        // END jostrow customization

        if( $fh = @fopen( $the_file, "w" ) )
        {
            // BEGIN jostrow customization
            fwrite($fp, date('Y-m-d H:i:s') . " success\n");
            fclose($fp);
            // END jostrow customization

            fputs( $fh, $the_string, strlen($the_string) );
            fclose( $fh );
            return( true );
        }
        else
        {
            // BEGIN jostrow customization
            fwrite($fp, date('Y-m-d H:i:s') . " failed\n");
            fclose($fp);
            // END jostrow customization

            return( false );
        }
    }
    3) run the installer normally

    After installation, you'll notice the config.log should have some information in it. Please post it here, making sure to remove any sensitive information that could've been included (database passwords, etc.).

    Thanks!
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  5. #5
    Deuce is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    California
    Posts
    66

    Default Re: SugarOS-4.5.1c Installation ERROR

    Perhaps it's a php script timeout issue? Default php timeout is 30 seconds, and the Sugar install can take a while, especially on an older machine. I don't know if the installer sets the timeout, if not, maybe it should... http://us.php.net/set_time_limit

  6. #6
    Kalendrinn is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    200

    Default Re: SugarOS-4.5.1c Installation ERROR

    Thanks Julian, I posted the results below. The last 2-3 lines after the last variable don't end up in the config file but are output in the logs, not sure what that's about. As for a timeout issue Deuce, I doubt it unless it's writing some last thing at the end of the config after it does the database setup. If you notice, the config file is wirtten prior to the database setup and the script finishes just fine.

    From looking at the code, it looks as though the issue is with var_export() not returning the last value and parenthesis. Don't know if this is a bug in PHP 5.1.6 or not. I even went so far as to put the var_export() return string in its own variable before outputting it, as well as using sprintf() to insert all the values into the full config file string. The last value and remaining information is getting chopped off...like it stops processing. As Velma would say, something's hinky here. Just out of curiosity, I also tried catching an exception if there was one...but since PHP functions aren't built to throw exceptions there are none to be caught. Dunno, I am at a bit of a loss on this one. I will upgrade to PHP 5.2.1 as we have on our production server and see if that fixes the issue. Otherwise i haven't had an issue with the install or the application itself. I'll let you know what i find.

    Here's the output:

    2007-08-01 10:05:25 contents of sugar_config: '<?php
    // created: 2007-08-01 10:05:25
    $sugar_config = array (
    \'admin_export_only\' => false,
    \'cache_dir\' => \'cache/\',
    \'calculate_response_time\' => true,
    \'create_default_user\' => false,
    \'currency\' => \'\',
    \'dashlet_display_row_options\' =>
    array (
    0 => \'1\',
    1 => \'3\',
    2 => \'5\',
    3 => \'10\',
    ),
    \'date_formats\' =>
    array (
    \'Y-m-d\' => \'2006-12-23\',
    \'m-d-Y\' => \'12-23-2006\',
    \'d-m-Y\' => \'23-12-2006\',
    \'Y/m/d\' => \'2006/12/23\',
    \'m/d/Y\' => \'12/23/2006\',
    \'d/m/Y\' => \'23/12/2006\',
    \'Y.m.d\' => \'2006.12.23\',
    \'d.m.Y\' => \'23.12.2006\',
    \'m.d.Y\' => \'12.23.2006\',
    ),
    \'datef\' => \'Y-m-d\',
    \'dbconfig\' =>
    array (
    \'db_host_name\' => \'xxxxxx\',
    \'db_host_instance\' => \'\',
    \'db_user_name\' => \'xxxxxx\',
    \'db_password\' => \'xxxx\',
    \'db_name\' => \'sugarcrm2\',
    \'db_type\' => \'mysql\',
    ),
    \'dbconfigoption\' =>
    array (
    \'persistent\' => true,
    \'autofree\' => false,
    \'debug\' => 0,
    \'seqname_format\' => \'%s_seq\',
    \'portability\' => 0,
    \'ssl\' => false,
    ),
    \'default_action\' => \'index\',
    \'default_charset\' => \'UTF-8\',
    \'default_currencies\' =>
    array (
    \'AUD\' =>
    array (
    \'name\' => \'Austrailian Dollars\',
    \'iso4217\' => \'AUD\',
    \'symbol\' => \'$\',
    ),
    \'BRL\' =>
    array (
    \'name\' => \'Brazilian Reais\',
    \'iso4217\' => \'BRL\',
    \'symbol\' => \'R$\',
    ),
    \'GBP\' =>
    array (
    \'name\' => \'British Pounds\',
    \'iso4217\' => \'GBP\',
    \'symbol\' => \'£\',
    ),
    \'CAD\' =>
    array (
    \'name\' => \'Candian Dollars\',
    \'iso4217\' => \'CAD\',
    \'symbol\' => \'$\',
    ),
    \'CNY\' =>
    array (
    \'name\' => \'Chinese Yuan\',
    \'iso4217\' => \'CNY\',
    \'symbol\' => \'元\',
    ),
    \'EUR\' =>
    array (
    \'name\' => \'Euro\',
    \'iso4217\' => \'EUR\',
    \'symbol\' => \'€\',
    ),
    \'HKD\' =>
    array (
    \'name\' => \'Hong Kong Dollars\',
    \'iso4217\' => \'HKD\',
    \'symbol\' => \'$\',
    ),
    \'INR\' =>
    array (
    \'name\' => \'Indian Rupees\',
    \'iso4217\' => \'INR\',
    \'symbol\' => \'₨\',
    ),
    \'KRW\' =>
    array (
    \'name\' => \'Korean Won\',
    \'iso4217\' => \'KRW\',
    \'symbol\' => \'₩\',
    ),
    \'YEN\' =>
    array (
    \'name\' => \'Japanese Yen\',
    \'iso4217\' => \'JPY\',
    \'symbol\' => \'¥\',
    ),
    \'MXM\' =>
    array (
    \'name\' => \'Mexican Pesos\',
    \'iso4217\' => \'MXM\',
    \'symbol\' => \'$\',
    ),
    \'SGD\' =>
    array (
    \'name\' => \'Singaporean Dollars\',
    \'iso4217\' => \'SGD\',
    \'symbol\' => \'$\',
    ),
    \'CHF\' =>
    array (
    \'name\' => \'Swiss Franc\',
    \'iso4217\' => \'CHF\',
    \'symbol\' => \'SFr.\',
    ),
    \'THB\' =>
    array (
    \'name\' => \'Thai Baht\',
    \'iso4217\' => \'THB\',
    \'symbol\' => \'฿\',
    ),
    \'USD\' =>
    array (
    \'name\' => \'US Dollars\',
    \'iso4217\' => \'USD\',
    \'symbol\' => \'$\',
    ),
    ),
    \'default_currency_iso4217\' => \'USD\',
    \'default_currency_name\' => \'US Dollars\',
    \'default_currency_significant_digits\' => \'2\',
    \'default_currency_symbol\' => \'$\',
    \'default_date_format\' => \'Y-m-d\',
    \'default_decimal_seperator\' => \'.\',
    \'default_email_charset\' => \'UTF-8\',
    \'default_email_client\' => \'sugar\',
    \'default_email_editor\' => \'html\',
    \'default_export_charset\' => \'UTF-8\',
    \'default_language\' => \'en_us\',
    \'default_locale_name_format\' => \'s f l\',
    \'default_max_subtabs\' => \'12\',
    \'default_max_tabs\' => \'12\',
    \'default_module\' => \'Home\',
    \'default_navigation_paradigm\' => \'m\',
    \'default_number_grouping_seperator\' => \',\',
    \'default_password\' => \'\',
    \'default_subpanel_links\' => false,
    \'default_subpanel_tabs\' => true,
    \'default_swap_last_viewed\' => false,
    \'default_swap_shortcuts\' => false,
    \'default_theme\' => \'Sugar\',
    \'default_time_format\' => \'H:i\',
    \'default_user_is_admin\' => false,
    \'default_user_name\' => \'\',
    \'disable_export\' => false,
    \'disable_persistent_connections\' => \'false\',
    \'display_email_template_variable_chooser\' => false,
    \'display_inbound_email_buttons\' => false,
    \'dump_slow_queries\' => false,
    \'email_default_client\' => \'sugar\',
    \'email_default_delete_attachments\' => true,
    \'email_default_editor\' => \'html\',
    \'export_delimiter\' => \',\',
    \'history_max_viewed\' => 10,
    \'host_name\' => \'devintranet\',
    \'i18n_test\' => true,
    \'import_dir\' => \'cache/import/\',
    \'import_max_execution_time\' => 3600,
    \'installer_locked\' => true,
    \'js_custom_version\' => \'\',
    \'js_lang_version\' => 1,
    \'languages\' =>
    array (
    \'en_us\' => \'US English\',
    ),
    \'large_scale_test\' => false,
    \'list_max_entries_per_page\' => 20,
    \'list_max_entries_per_subpanel\' => 10,
    \'lock_default_user_name\' => false,
    \'lock_homepage\' => false,
    \'lock_subpanels\' => false,
    \'log_dir\' => \'.\',
    \'log_file\' => \'sugarcrm.log\',
    \'log_memory_usage\' => false,
    \'login_nav\' => false,
    \'max_dashlets_homepage\' => \'15\',
    \'require_accounts\' => true,
    \'rss_cache_time\' => \'10800\',
    \'save_query\' => \'all\',
    \'session_dir\' => \'\',
    \'site_url\' => \'http://devintranet/sugar2\',
    \'slow_query_time_msec\' => \'100\',
    \'sugar_version\' => \'4.5.1e\',
    \'sugarbeet\' => true,
    \'time_formats\' =>
    array (
    \'H:i\' => \'23:00\',
    \'h:ia\' => \'11:00pm\',
    \'h:iA\' => \'11:00PM\',
    \'H.i\' => \'23.00\',
    \'h.ia\' => \'11.00pm\',
    \'h.iA\' => \'11.00PM\',
    ),
    \'timef\' => \'H:i\',
    \'tmp_dir\' => \'cache/xml/\',
    \'translation_string_prefix\' => false,
    \'unique_key\' => \'41047b5e2a4b856460a89742edf4a808\',
    \'upload_badext\' =>
    array (
    0 => \'php\',
    1 => \'php3\',
    2 => \'php4\',
    3 => \'php5\',
    4 => \'pl\',
    5 => \'cgi\',
    6 => \'py\',
    7 => \'asp\',
    8 => \'cfm\',
    9 => \'js\',
    10 => \'vbs\',
    11 => \'html\',
    12 => \'htm\',
    ),
    \'upload_dir\' => \'cache/upload/\',
    \'upload_maxsize\' => 3000000,
    \'use_php_code_json\' => true,
    \'verify_client_ip\' => true,
    );
    ?>
    '
    2007-08-01 10:05:25 success

  7. #7
    Kalendrinn is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    200

    Default Re: SugarOS-4.5.1c Installation ERROR

    Well, that was a quick test. I suggest you tell people to stay far away from 5.1.6 as it's not a very good version of PHP. Upgrading to 5.2.1 worked and the config was written properly. So something in 5.1.6's var_export() or related mechanisms is failing so it doesn't output the last value and closing parenthesis...and it's affecting the rest of the string being added afterwards. So yeah...

    PHP 5.1.6 = BAD

  8. #8
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: SugarOS-4.5.1c Installation ERROR

    Thanks for helping us test this out! I'll try to get PHP 5.1.6 installed and see if I can reproduce the bug.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  9. #9
    Kalendrinn is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    200

    Default Re: SugarOS-4.5.1c Installation ERROR

    No problem. Though I just looked again at hazen's setup and he/she's using 5.2.1...so not sure if it's the same cause or not. Could be he/she did the same thing as me, had 5.1.6 on one box and 5.2.1 on another and just hadn't upgraded the 5.1.6 box. But I know it was 5.1.6 that was the problem for me.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2006-09-19, 01:12 AM
  2. Module builder help
    By sjilumudi in forum Downloads
    Replies: 3
    Last Post: 2006-08-18, 11:25 PM
  3. Replies: 0
    Last Post: 2005-09-09, 06:46 AM
  4. Installation 3.01b - error
    By rgarretson in forum Help
    Replies: 0
    Last Post: 2005-08-07, 07:39 PM

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
  •