• Jumpinjacq
  • NEWBIE
  • 25 Points
  • Member since 2011

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

Hi there,

 

I need some help in figuring out where the issue is in this salesforce connection script, here is what I've got and done so far:

 

1.  I installed PHP Toolkit 20.0

2.  Downloaded enterprise wsdl and updated the file in toolkit under soapclient directory

3.  Updated security token to make sure it was accurate for the account I'll be creating a connection to

4.  Checked phpinfo() on my server to make sure all requirements were met (PHP Version 5.2.13, openssl enabled, SOAP Client and Server both enabled)

5.  Got the log in script uploaded to the server and ran it for the first time

6.  Fixed errors that I initially got related to paths and syntax

7.  Currently, the script works to $client = new SforceEnterpriseClient();, but the next line ($client->createConnection($wsdl);) is not executed properly, I think and although I've added error reporting in the script, I'm not getting any message other than the 500 internal server error as you'll see in point #9 and ultimately, I can't even confirm that I've actually connected to SF because the script is not getting that far

8.  I put in an echo statement right after $client = new SforceEnterpriseClient(); to make sure it was getting to that point, and that worked, because the screen output the message when the script was run;  I did the same after $client->createConnection($wsdl);, but the screen did not show the echoed message when the script was run

9.  If I do not have the echo statement after $client = new SforceEnterpriseClient();, I get a 500 internal server error on the screen when the script is run

 

The following is the log in script:

 

<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
require_once ('lib/soapclient/SforceEnterpriseClient.php');
require_once ('lib/soapclient/SforceHeaderOptions.php');

// Login to salesforce.com
$login = 'my email for log in';
$password = 'my current pw that is confirmed correct';
$key = 'my updated token';

//join Password and Key here
$password = $password . $key;

$wsdl = 'lib/soapclient/enterprise.wsdl.xml';
$client = new SforceEnterpriseClient();
$client->createConnection($wsdl);

try
{
    $loginResult = $client->login($login, $password);

    if ($loginResult->passwordExpired)
    {
        unset($client);
    }
}
catch (exception $e)
{
    $error = '<pre>' . print_r($e, true) . '</pre>';
    mail('my email again', 'Salesforce Login Error', $error);
    unset($client);
}
?> 

 

 

I've exhausted any ideas for this issue, so I'm reaching out to anyone who might be able to help.  Thank you.

Hi there,

 

I need some help in figuring out where the issue is in this salesforce connection script, here is what I've got and done so far:

 

1.  I installed PHP Toolkit 20.0

2.  Downloaded enterprise wsdl and updated the file in toolkit under soapclient directory

3.  Updated security token to make sure it was accurate for the account I'll be creating a connection to

4.  Checked phpinfo() on my server to make sure all requirements were met (PHP Version 5.2.13, openssl enabled, SOAP Client and Server both enabled)

5.  Got the log in script uploaded to the server and ran it for the first time

6.  Fixed errors that I initially got related to paths and syntax

7.  Currently, the script works to $client = new SforceEnterpriseClient();, but the next line ($client->createConnection($wsdl);) is not executed properly, I think and although I've added error reporting in the script, I'm not getting any message other than the 500 internal server error as you'll see in point #9 and ultimately, I can't even confirm that I've actually connected to SF because the script is not getting that far

8.  I put in an echo statement right after $client = new SforceEnterpriseClient(); to make sure it was getting to that point, and that worked, because the screen output the message when the script was run;  I did the same after $client->createConnection($wsdl);, but the screen did not show the echoed message when the script was run

9.  If I do not have the echo statement after $client = new SforceEnterpriseClient();, I get a 500 internal server error on the screen when the script is run

 

The following is the log in script:

 

<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
require_once ('lib/soapclient/SforceEnterpriseClient.php');
require_once ('lib/soapclient/SforceHeaderOptions.php');

// Login to salesforce.com
$login = 'my email for log in';
$password = 'my current pw that is confirmed correct';
$key = 'my updated token';

//join Password and Key here
$password = $password . $key;

$wsdl = 'lib/soapclient/enterprise.wsdl.xml';
$client = new SforceEnterpriseClient();
$client->createConnection($wsdl);

try
{
    $loginResult = $client->login($login, $password);

    if ($loginResult->passwordExpired)
    {
        unset($client);
    }
}
catch (exception $e)
{
    $error = '<pre>' . print_r($e, true) . '</pre>';
    mail('my email again', 'Salesforce Login Error', $error);
    unset($client);
}
?> 

 

 

I've exhausted any ideas for this issue, so I'm reaching out to anyone who might be able to help.  Thank you.

Hi there,

 

I need some help in figuring out where the issue is in this salesforce connection script, here is what I've got and done so far:

 

1.  I installed PHP Toolkit 20.0

2.  Downloaded enterprise wsdl and updated the file in toolkit under soapclient directory

3.  Updated security token to make sure it was accurate for the account I'll be creating a connection to

4.  Checked phpinfo() on my server to make sure all requirements were met (PHP Version 5.2.13, openssl enabled, SOAP Client and Server both enabled)

5.  Got the log in script uploaded to the server and ran it for the first time

6.  Fixed errors that I initially got related to paths and syntax

7.  Currently, the script works to $client = new SforceEnterpriseClient();, but the next line ($client->createConnection($wsdl);) is not executed properly, I think and although I've added error reporting in the script, I'm not getting any message other than the 500 internal server error as you'll see in point #9 and ultimately, I can't even confirm that I've actually connected to SF because the script is not getting that far

8.  I put in an echo statement right after $client = new SforceEnterpriseClient(); to make sure it was getting to that point, and that worked, because the screen output the message when the script was run;  I did the same after $client->createConnection($wsdl);, but the screen did not show the echoed message when the script was run

9.  If I do not have the echo statement after $client = new SforceEnterpriseClient();, I get a 500 internal server error on the screen when the script is run

 

The following is the log in script:

 

<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
require_once ('lib/soapclient/SforceEnterpriseClient.php');
require_once ('lib/soapclient/SforceHeaderOptions.php');

// Login to salesforce.com
$login = 'my email for log in';
$password = 'my current pw that is confirmed correct';
$key = 'my updated token';

//join Password and Key here
$password = $password . $key;

$wsdl = 'lib/soapclient/enterprise.wsdl.xml';
$client = new SforceEnterpriseClient();
$client->createConnection($wsdl);

try
{
    $loginResult = $client->login($login, $password);

    if ($loginResult->passwordExpired)
    {
        unset($client);
    }
}
catch (exception $e)
{
    $error = '<pre>' . print_r($e, true) . '</pre>';
    mail('my email again', 'Salesforce Login Error', $error);
    unset($client);
}
?> 

 

 

I've exhausted any ideas for this issue, so I'm reaching out to anyone who might be able to help.  Thank you.