Obama '08

               
   

Go Back   Mike Simonds > Salesforce > Salesforce Coding Discussions

This is a discussion on Starting out with the ToolKit?? within the Salesforce Coding Discussions forums, part of the Salesforce category; Hi: First of all I love this site...Thank you for this site...

Reply
 
LinkBack Thread Tools Rate Thread
  #1  
Old 03-28-2008, 09:49 AM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2  
Old 03-28-2008, 10:29 AM
Administrator
 
Join Date: May 2007
Posts: 248
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 03-28-2008, 11:05 AM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 03-28-2008, 01:12 PM
Administrator
 
Join Date: May 2007
Posts: 248
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 03-28-2008, 01:29 PM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 03-28-2008, 01:30 PM
Administrator
 
Join Date: May 2007
Posts: 248
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike

hmm I would guess that you are not saving it properly

Can you upload it here and let me take a look at it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 03-28-2008, 01:49 PM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 03-28-2008, 01:54 PM
Administrator
 
Join Date: May 2007
Posts: 248
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike

your partner WSDL file
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 03-28-2008, 01:58 PM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 03-28-2008, 02:08 PM
Administrator
 
Join Date: May 2007
Posts: 248
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike

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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump



Powered by vBulletin


SEO by vBSEO 3.2.0 RC8 ©2008, Crawlability, Inc.

1 2 3 4 5