+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Starting out with the ToolKit??

  1. #1
    zishan876 is offline Junior Member
    Join Date
    Mar 2008
    Posts
    12

    Question Starting out with the ToolKit??

    Hi:
    First of all I love this site...Thank you for this site...
    Secondly, I was wondering if anyone can help me out, or point me to the right
    thread that can...
    A) I downloaded the latest version php toolkit 11.0b
    B) uploaded it to one of my domains
    C) when I try to go into the login php i get errors
    title
    Is there something I suppose to do before I do anything.. The company I work for uses the Enterprise Unlimited Edition...
    I am new to PHP Salesforce but not new to php..
    My hosting bluehost uses php5...

    Please advise
    Thanks
    Zishan
    Are you a Techy, Place your resume up or Job Posting for Strictly IT

  2. #2
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    557
    Blog Entries
    15
    The samples in the toolkit are flawed, they always give the Headers already sent error messages. I do knot know why Nick Tran has not corrected them!


    Anway I tried your script and cannot login either, that maybe something that has to do with your php setup

    Can you setup a phpinfo and let me take a look at it and link it here?

    Maybe try this script:



    PHP Code:
    <?php

    $user 
    'masimonds@gmail.com';
    $pass 'mas4155';

    /* this is the key that I generated from my development account
    * which allows you to bipass the IP check in Salesforce
    * go to salesforce > My personal Information > Reset my security Token*/
    $pass_string 'L07opnWnbTKrvJ3wcpFiWyTsl';

    $pass $pass.$pass_string;

    require_once (
    './includes/soapclient/SforcePartnerClient.php');
    $mySforceConnection = new SforcePartnerClient();
    $mySoapClient $mySforceConnection->createConnection("./includes/partner.wsdl");
    $mylogin $mySforceConnection->login($user$pass);

    try
    {
      if (
    $mylogin)
      {
        echo 
    "logged in <br />";
        echo 
    $mySforceConnection->getLastRequest()."<br />";
        echo 
    $mySforceConnection->getLastRequestHeaders()."<br />";
      }
      else
      {
        echo 
    "crap, something is wrong";
      }
    }
    catch (
    Exception $e)
    {
        echo 
    $mySforceConnection->getLastRequest();
        echo 
    $mySforceConnection->getLastRequestHeaders();
        echo 
    '<pre>' print_r($e,true) . '</pre>';
    }
    ?>
    make sure that you have SOAP and SSL enabled in you php setup

    ALSO

    make sure that you check the paths to the require_once

    ~Mike

  3. #3
    zishan876 is offline Junior Member
    Join Date
    Mar 2008
    Posts
    12
    Hi Mike:
    Thank you for the quick response.. Here is the link to the phpinfo:
    phpinfo()

    Also, I copied your code and placed it in here is the link to that:
    bharatkishaan.com/sfdc/samples/log.php

    The only thing is where is partner.wsdl??? Where do i get that from?
    I have partner.wsdl.xml should I take out the extension .xml?
    Thanks
    Zishan
    Are you a Techy, Place your resume up or Job Posting for Strictly IT
    Last edited by zishan876; 03-28-2008 at 11:07 AM. Reason: place in link

  4. #4
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    557
    Blog Entries
    15
    Your phpinfo looks correct


    Your can rename it or just change the path to reflect the xml extension:

    PHP Code:
    $mySoapClient $mySforceConnection->createConnection("./includes/partner.wsdl"); 
    OR

    PHP Code:
    $mySoapClient $mySforceConnection->createConnection("./includes/partner.wsdl.xml"); 

    to get the most up to date WSDL file:


    Login to your salesforce
    go to Setup
    App setup
    Develop
    API

    You will see it there

    Hope that helps

  5. #5
    zishan876 is offline Junior Member
    Join Date
    Mar 2008
    Posts
    12
    Hi:
    Ok so I changed the log.php file and uploaded the most current partner.wsdl.xml from salesforce.
    Now when I go to
    bharatkishaan.com/sfdc/samples/log.php
    I get

    The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. Invalid at the top level of the document. Error processing resource 'http://www.bharatkishaan.com/sfdc/samples/log.php'. L...
    logged in <br /><?xml version="1.0" encoding="UTF-8"?>^Is that what I am suppose to get?... So now how do I fix the login page? is it the same way?ThanksZishanwww.strictlyit.com

  6. #6
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    557
    Blog Entries
    15
    hmm I would guess that you are not saving it properly

    Can you upload it here and let me take a look at it

  7. #7
    zishan876 is offline Junior Member
    Join Date
    Mar 2008
    Posts
    12
    well i moved the session_start() up on the login.php page and try to login but I get the following error:
    usermypass POST /services/Soap/c/12.0 HTTP/1.1 Host: CRM Software On Demand, Online CRM Solutions - salesforce.com Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.5 Accept-Encoding: gzip, deflate Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 319
    I change the userand mypass ...
    But wht file do you want me to upload?
    Thanks
    Zishan

  8. #8
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    557
    Blog Entries
    15
    your partner WSDL file

  9. #9
    zishan876 is offline Junior Member
    Join Date
    Mar 2008
    Posts
    12
    I can not upload it because its a big file but I can give you the link to it
    it is
    bharatkishaan.com/sfdc/samples/partner.wsdl.xml

  10. #10
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    557
    Blog Entries
    15
    hmmm looks right!

    maybe I can work with you offline and get this working

    Do you have any IM's, if so use one of my IM's:

    Send an Instant Message to mike Using...

+ Reply to Thread
Page 1 of 2 1 2 LastLast

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

SEO by vBSEO 3.5.1