Expat-IT Tech Bits

Home

Contact

Links

Search this site:

Categories:

/ (287)
  Admin/ (122)
    Apache/ (10)
      HTTPS-SSL/ (4)
      PHP/ (3)
      performance/ (2)
    Cherokee/ (1)
    LAN/ (4)
    LVM/ (6)
    Monitoring/ (2)
      munin/ (2)
    SSH/ (6)
    SSL/ (1)
    Samba/ (1)
    VPN-options/ (6)
      OpenVPN/ (1)
      SSH-Proxy/ (3)
      Tinc/ (1)
      sshuttle/ (1)
    backups/ (17)
      SpiderOak/ (1)
      backuppc/ (5)
      dirvish/ (1)
      misc/ (6)
      rdiff-backup/ (1)
      rsync/ (1)
      unison/ (2)
    commandLine/ (24)
      files/ (8)
      misc/ (10)
      network/ (6)
    crontab/ (1)
    databases/ (15)
      MSSQL/ (2)
      MySQL/ (8)
      Oracle/ (3)
      PostgreSQL/ (1)
    dynamicDNS/ (2)
    email/ (11)
      Dovecot/ (1)
      deliverability/ (1)
      misc/ (1)
      postfix/ (7)
      puppet/ (1)
    iptables/ (3)
    tripwire/ (1)
    virtualization/ (9)
      VMware/ (1)
      virtualBox/ (8)
  Coding/ (14)
    bash/ (1)
    gdb/ (1)
    git/ (3)
    php/ (5)
    python/ (4)
      Django/ (2)
  Education/ (1)
  Hosting/ (27)
    Amazon/ (18)
      EBS/ (3)
      EC2/ (10)
      S3/ (1)
      commandline/ (4)
    Godaddy/ (2)
    NearlyFreeSpeech/ (3)
    Rackspace/ (1)
    vpslink/ (3)
  Linux/ (30)
    Android/ (1)
    Awesome/ (3)
    CPUfreq/ (1)
    China/ (2)
    Debian/ (8)
      APT/ (3)
      WPA/ (1)
    audio/ (1)
    encryption/ (3)
    fonts/ (1)
    misc/ (6)
    remoteDesktop/ (1)
    router-bridge/ (3)
  SW/ (45)
    Micro$soft/ (1)
    browser/ (2)
      Chrome/ (1)
      Firefox/ (1)
    business/ (28)
      Drupal/ (9)
      KnowledgeTree/ (6)
      Redmine/ (2)
      SugarCRM/ (7)
      WebERP/ (2)
      WordPress/ (1)
      eGroupware/ (1)
    chat/ (1)
    email/ (1)
    fileSharing/ (2)
      btsync/ (1)
      mldonkey/ (1)
    graphics/ (2)
    research/ (2)
    website/ (6)
      blog/ (6)
        blosxom/ (3)
        rss2email/ (1)
        webgen/ (1)
  Security/ (15)
    IMchat/ (2)
    circumvention/ (2)
    cryptoCurrency/ (1)
    e-mail/ (4)
    greatFirewall/ (1)
    hacking/ (1)
    password/ (1)
    privacy/ (2)
    skype/ (1)
  Services/ (1)
    fileSharing/ (1)
  TechWriting/ (1)
  xHW/ (14)
    Lenovo/ (1)
    Motorola_A1200/ (2)
    Thinkpad_600e/ (1)
    Thinkpad_a21m/ (3)
    Thinkpad_i1300/ (1)
    Thinkpad_x24/ (1)
    USB_audio/ (1)
    scanner/ (1)
    wirelessCards/ (2)
  xLife/ (17)
    China/ (9)
      Beijing/ (5)
        OpenSource/ (3)
    Expatriation/ (1)
    Vietnam/ (7)

Archives:

  • 2016/07
  • 2016/05
  • 2016/02
  • 2016/01
  • 2015/12
  • 2015/11
  • 2015/06
  • 2015/01
  • 2014/12
  • 2014/11
  • 2014/10
  • 2014/09
  • 2014/07
  • 2014/04
  • 2014/02
  • 2014/01
  • 2013/12
  • 2013/10
  • 2013/08
  • 2013/07
  • 2013/06
  • 2013/05
  • 2013/04
  • 2013/02
  • 2013/01
  • 2012/12
  • 2012/10
  • 2012/09
  • 2012/08
  • 2012/07
  • 2012/06
  • 2012/05
  • 2012/04
  • 2012/03
  • 2012/01
  • 2011/12
  • 2011/11
  • 2011/10
  • 2011/09
  • 2011/08
  • 2011/07
  • 2011/06
  • 2011/05
  • 2011/04
  • 2011/02
  • 2010/12
  • 2010/11
  • 2010/10
  • 2010/09
  • 2010/08
  • 2010/07
  • 2010/06
  • 2010/05
  • 2010/04
  • 2010/03
  • 2010/02
  • 2010/01
  • 2009/12
  • 2009/11
  • 2009/10
  • 2009/09
  • 2009/08
  • 2009/07
  • 2009/06
  • 2009/05
  • 2009/04
  • 2009/03
  • 2009/02
  • 2009/01
  • 2008/12
  • 2008/11
  • 2008/10
  • 2008/09
  • Subscribe XML RSS Feed

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
    PyBlosxom

    This site has no ads. To help with hosting, crypto donations are accepted:
    Bitcoin: 1JErV8ga9UY7wE8Bbf1KYsA5bkdh8n1Bxc
    Zcash: zcLYqtXYFEWHFtEfM6wg5eCV8frxWtZYkT8WyxvevzNC6SBgmqPS3tkg6nBarmzRzWYAurgs4ThkpkD5QgiSwxqoB7xrCxs

    Sun, 07 Apr 2013


    /SW/business/SugarCRM: SugarCRM's "Silent Upgrade"

    Lately SugarCRM's up-until-recently rock-solid upgrade process has become flaky, and I have had to turn to the "silent upgrade" tool to get the job done. I have not yet stumbled across official documentation, but this[1] does the trick for me.

    The first step is to get the upgrade zip, for example SugarCE-Upgrade-6.5.x-to-6.5.12.zip, onto the server. Then just run something like this:

    php -f /home/sugartest/public_html/modules/UpgradeWizard/silentUpgrade.php /home/clayton/SugarCE-Upgrade-6.5.x-to-6.5.12.zip /tmp/sugarUpgrade.log /home/sugartest/public_html/ admin

    where most of the parameters should be fairly self-evident: the last is the account name you login to SugarCRM with, the second last is the path to the SugarCRM installation you are upgrading.

    Then you probably have to correct the permissions, as you probably ran the above as root:

    chown -R www-data:sugarcrm public_html/

    And finally login to SugarCRM and click through the menus to do the following:

    Admin --> Repair --> Rebuild Relationships

    [1] http://www.hostknox.com/tutorials/sugarcrm/silent-upgrade

    posted at: 04:01 | path: /SW/business/SugarCRM | permanent link to this entry

    Wed, 14 Oct 2009


    /SW/business/SugarCRM: SugarCRM Built-in Data Tranfer Tool is Highly Developed

    SugarCRM is fundamentally a big, complicated address book, and any migration to SugarCRM can often reasonably include a wish to import a bunch of contact data from another application. In my case, I have a MySQL database.

    To get this database into SugarCRM is basically a two-step process:

    This all works quite well as of SugarCRM version 5.5. 5.2 does not work so well: e-mail addresses do not import as they *all* trigger a syntax error, Account/Contact association is lost, etc. If you are doing a substantial data import I recommend you go right for the not-yet-stable version 5.5. It is a release candidate so it will be the new stable very soon.

    posted at: 01:31 | path: /SW/business/SugarCRM | permanent link to this entry

    Tue, 13 Oct 2009


    /SW/business/SugarCRM: SugarCRM Upgrades

    With "normal" PHP web applications, upgrading is a matter of downloading a tarball containing the new version of the application, unpacking it in the web root, and then running an upgrade.php script inside the new version to update the table structure of the back-end database to the new layout.

    Not so with SugarCRM, and it is slightly non-obvious what the upgrade procedure might be. The first thing you notice when you download a tarball is that there is no upgrade (or update) script. Some poking around in the admin portion of the user interface leads to the discovery of an "Upgrade Wizard", so one's first instinct is to feed the afore-mentioned tarball (actually, in this case, a zip archive) into the Wizard. This does not work, and in fact complains about a "missing manifest.php script" in the archive.

    In fact, what this wizard is looking for is a specific kind of file: an "upgrade" or a "patch" zip from sugarforge. And this somewhat buried page is where you need to go looking for these things:

    http://www.sugarforge.org/frs/?group_id=6

    posted at: 22:18 | path: /SW/business/SugarCRM | permanent link to this entry

    Tue, 04 Aug 2009


    /SW/business/SugarCRM: A Simple SugarCRM API Class

    This should give anyone needing to use the SugarCRM API a quickstart:

    <?php /* * class_sugarconnect.php * * Copyright 2009 Clayton Koenig <ckoeni@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ ?> <?php class sugarapi{ // connection variables var $client; // soap client var $session_id; // identifier for this login session var $user_id; // of logged in user // connection settings for SOAP var $options = array( "location" => 'https://url.of.your.sugarcrm.installation.com/sugarcrm/soap.php', "uri" => 'http://www.sugarcrm.com/sugarcrm', "trace" => 1 ); //user authentication array (version is SOAP version) private $user_auth = array(); function __construct() { // must use constructor b/c of MD5 function call $this->user_auth = array( "user_name" => 'sugaruserid', "password" => MD5('yourpasswd'), "version" => '.01' ); } // arrays for input into sugarCRM modules var $contact = array(); var $account = array(); function login() { $this->client = new SoapClient(NULL, $this->options); $response = $this->client->login($this->user_auth); // var_dump($response); // just in case you need it $this->session_id = $response->id; printf("<p></p>session id = ". $this->session_id); $this->user_id = $this->client->get_user_id($this->session_id); printf("<p>" . $this->user_auth['user_name'] . ' has a GUID of ' . $this->user_id . "<p>"); } function getModules() { $response = $this->client->get_available_modules($this->session_id); foreach ($response->modules as $i => $value) { printf($response->modules[$i] . "<br>"); } } function getModuleFields($module) { $response = $this->client->get_module_fields($this->session_id, $module); printf("<p>Module " . $response->module_name .' has the following fields:' . "<p>"); printf("<table><tr>" . "<td><u>Name</td><td><u>Type</td><td><u>Label</td>" . "<td><u>Required</td><td><u>Options</td>" . "</tr>"); foreach ($response->module_fields as $i => $value) { printf('<tr><td>' . $response->module_fields[$i]->name . '</td>' . '<td>' . $response->module_fields[$i]->type . '</td>' . '<td>' . $response->module_fields[$i]->label . '</td>' . '<td>' . $response->module_fields[$i]->required . '</td>' . '<td>' . $response->module_fields[$i]->options . '</td></tr>'); } printf('</table>'); } function setContactField($fieldname, $fieldvalue) { $this->contact[] = array("name" => $fieldname,"value" => $fieldvalue); } function storeContact() { // into sugar's Contacts database $response = $this->client->set_entry($this->session_id, 'Contacts', $this->contact); var_dump($response); } } ?>

    And the following is a simple example of how to use the above class to create a simple contact record with a name and an e-mail address, and store it in Sugar's Contacts database.

    <?php include("class_sugarapi.php"); $sugar = new sugarapi(); $sugar->login(); // populate the contact array $sugar->setContactField('last_name', 'Bloke2'); $sugar->setContactField('email1', 'xyz@wxy.net'); // var_dump($sugar->contact); $sugar->storeContact(); // to Contacts database ?>

    To find out all the possible fields in the Contacts database, use this script:

    <?php include("class_sugarapi.php"); $sugar = new sugarapi(); $sugar->login(); // look what modules sugar exposes $sugar->getModules(); // look in more detail at the fields in a module $sugar->getModuleFields('Accounts'); ?>

    Many thanks to this post[1] for getting me on my way.

    [1] http://systemsconsciousness.com/2009/04/10/sugarcrm-soap-examples/

    posted at: 04:14 | path: /SW/business/SugarCRM | permanent link to this entry

    Fri, 31 Jul 2009


    /SW/business/SugarCRM: Introduction to SugarCRM API

    Documentation sucks. Their wiki[1] is flat-out wrong. Thankfully the blog world has some good information[2], though beware older posts are often obsolete and also will not work. This example should hopefully quickstart you and get you past the first crucial step of login through the API:

    <?php // connection settings for SOAP $options = array( "location" => 'https://url.of.your.sugarcrm.installation/soap.php', "uri" => 'http://www.sugarcrm.com/sugarcrm', "trace" => 1 ); // connect to soap server $client = new SoapClient(NULL, $options); //user authentication array (version is SOAP version) $user_auth = array( "user_name" => 'username', "password" => MD5('password'), "version" => '.01' ); $response = $client->login($user_auth); // var_dump($response); // just in case you need it $session_id = $response->id; printf("<p></p>session id = ". $session_id); $user_guid = $client->get_user_id($session_id); printf("<p>" . $user_auth['user_name'].' has a GUID of ' . $user_guid . "<p>"); // look what modules sugar exposes $response = $client->get_available_modules($session_id); foreach ($response->modules as $i => $value) { printf($response->modules[$i] . "<br>"); } ?>

    I think this code is quite self-explanatory. If it does not work, uncomment the var_dump of the login response, which will tell you the error string you are getting back.

    [1] http://www.sugarcrm.com/wiki/index.php?title=SOAP_Intro_and_Practical_Examples
    [2] http://systemsconsciousness.com/2009/04/10/sugarcrm-soap-examples/

    posted at: 04:54 | path: /SW/business/SugarCRM | permanent link to this entry

    Sat, 11 Apr 2009


    /SW/business/SugarCRM: SugarCRM Language Pack Installation

    https://www.sugarcrm.com/forums/showthread.php?t=34942 is a very useful post.

    Thereafter the language is an option at login. I have found no way to hard code a default language for a particular user (though there is a system-wide default). I have also discovered that a userid in the current SugarCRM, once created, can never be deleted.

    posted at: 01:22 | path: /SW/business/SugarCRM | permanent link to this entry

    Mon, 30 Mar 2009


    /SW/business/SugarCRM: SugarCRM Installation

    Download latest Open Source version from: http://www.sugarforge.org/, then install it:

    unzip SugarCE-5.2.0c.zip
    chown -R www-data:www-data SugarCE-Full-5.2.0c/
    ln -s SugarCE-Full-5.2.0c/ sugarcrm

    (Installation docs can be found at https://www.sugarcrm.com/crm/support/documentation.)

    Now invoke the installation wizard by pointing your browser at install.php, for instance:

    http://apps.vancouversolidcomputing.com/sugarcrm/install.php

    and step through to the "Custom Install" point where the database is setup.

    Database Name: apps_sugarcrm
    Host Name: localhost
    Database Administrator Username: root
    Database Admin Password: mysql root password
    Sugar Database Username: apps_sugarcrm
    Sugar Database User Password: vsc apps mysql password

    Next screen is "Site Configuration": select a meaningful unique System Name, and record the admin password.

    posted at: 23:34 | path: /SW/business/SugarCRM | permanent link to this entry