Results 1 to 2 of 2

Thread: API: Error on create_account

  1. #1
    aptelamatt is offline Junior Member
    Join Date
    Mar 2007
    Posts
    2

    Default API: Error on create_account

    We have a working installation of SugarCRM 4.2.0d, and we have integrated some of our internal applications via the API. Everything has worked fine until we upgraded Sugar to 4.5.1b - now we're getting API errors.

    we have worked through several of the errors, but are stuck on this one.

    When we call create_account via the API, the following error is returned:

    Fatal error: Call to a member function quote() on a non-object in /path_to_my_install/include/database/PearDatabase.php on line 37

    Does anyone have any tips for diagnosing what might be wrong here?

    The function that is being called in PearDatabase.php is:

    function quote($string,$isLike=true){
    $string=$GLOBALS['db']->quote($string, $isLike);
    return $string;
    }



    Environment:

    Server: Apache/2.2.2 (Unix) mod_ssl/2.2.2 OpenSSL/0.9.7g DAV/2 PHP/5.1.4
    Slackware 10.2.0
    MySQL Ver 14.7 Distrib 4.1.14, for slackware-linux-gnu (i486) using EditLine wrapper


    Thanks,
    Matt

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: API: Error on create_account

    Does the following work for you? (Replace 'admin' and 'mypassword' with the values corresponding with your environment)

    Code:
    <?php
    
    $client = new SoapClient('http://127.0.0.1/sugar451/soap.php?wsdl');
    
    $oResult = $client->create_account('admin', md5('mypassword'), 'Futurama', '(714) 555-1212', 'www.futurama.com');
    
    echo $oResult;
    
    ?>
    You may need to post some of your code so we can see how the method is being called.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Soap API problem
    By Sabicho in forum Developer Help
    Replies: 13
    Last Post: 2007-02-26, 03:51 PM
  2. soap search API not working
    By sugarcare in forum Developer Help
    Replies: 0
    Last Post: 2006-06-08, 03:55 AM
  3. PATCH: Use PEAR DB API instead of native MySQL API
    By Eraserhd in forum Developer Help
    Replies: 0
    Last Post: 2005-10-02, 04:25 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
  •