• snapper
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

Hi all,

 

Sorry but this may be another really basic question that I can't find the answer too, does anyone have the code which uses the PHP toolkit API connections, and allows for a user to register on the SalesForce site?

 

Also what are the minimum amount of fields necessary for a user to register?

 

Thanks in advance, for any help or advice.

Hi all,

 

I am having issues while trying to login via the Salesforce API, I keep getting the error:

INVALID_LOGIN: Invalid username, password, security token; or user locked out.

 

I know that the username and password are correct, i have just reset my security token and appending that to the end of my password also didnt work.

 

Below is a copy of the code that I'm using:

 

ni_set("soap.wsdl_cache_enabled", "0" ) ;
require_once (SOAP_CLIENT_BASEDIR.'soapclient/SforcePartnerClient.php');
require_once (SOAP_CLIENT_BASEDIR.'userAuth.php');
try {
   $mySforceConnection = new SforcePartnerClient();
   $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR. "soapclient/partner.wsdl.xml");
   $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);

   echo "***** Login Info*****<br />";
   echo $mySforceConnection->getSessionId();
   print_r($mylogin);
} catch (Exception $e) {
   echo $mySforceConnection->getLastRequest();
   echo $e->faultstring;
}

 

Any one got any ideas on how I can fix this? Or why this could be happening?

 

All and any help is very appreciated, thanks in advance.

Hi all,

 

Sorry but this may be another really basic question that I can't find the answer too, does anyone have the code which uses the PHP toolkit API connections, and allows for a user to register on the SalesForce site?

 

Also what are the minimum amount of fields necessary for a user to register?

 

Thanks in advance, for any help or advice.

Hi all,

 

I am having issues while trying to login via the Salesforce API, I keep getting the error:

INVALID_LOGIN: Invalid username, password, security token; or user locked out.

 

I know that the username and password are correct, i have just reset my security token and appending that to the end of my password also didnt work.

 

Below is a copy of the code that I'm using:

 

ni_set("soap.wsdl_cache_enabled", "0" ) ;
require_once (SOAP_CLIENT_BASEDIR.'soapclient/SforcePartnerClient.php');
require_once (SOAP_CLIENT_BASEDIR.'userAuth.php');
try {
   $mySforceConnection = new SforcePartnerClient();
   $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR. "soapclient/partner.wsdl.xml");
   $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);

   echo "***** Login Info*****<br />";
   echo $mySforceConnection->getSessionId();
   print_r($mylogin);
} catch (Exception $e) {
   echo $mySforceConnection->getLastRequest();
   echo $e->faultstring;
}

 

Any one got any ideas on how I can fix this? Or why this could be happening?

 

All and any help is very appreciated, thanks in advance.

I can login to production just fine with my code.  But when I switch the wsdl to the sandbox one (the only change I make to my code), I get the following:

 

INVALID_LOGIN: Invalid username, password, security token; or user locked out.
Fatal error: SoapClient::__setSoapHeaders() [<a href='soapclient.--setsoapheaders'>soapclient.--setsoapheaders</a>]: Invalid SOAP header in C:\xampp\htdocs\SFApp\Includes\soapclient\SforceBaseClient.php on line 273

I do have the ini_set("soap.wsdl_cache_enabled", "0" ) ; line in my code.

 

 

What's going on?  Do I need to get a new security token for the sandbox?

 

Message Edited by skettios on 03-24-2010 03:49 PM