+ Start a Discussion

Enterprise PHP call Invalid Session ID

"INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session"

I tested some code with the partner wsdl and I was able create an Contact with no issues

I am trying into create > 4000 sales records using Enterprise wsdl.
I am using stdClass
I checked my session id at start of session and at create
public function __construct(){
       // session_start();
        $this->testSforceConnection = new SforceEnterpriseClient();
        $this->testSoapClient = $this->testSforceConnection ->createConnection($this->wsdl);
        $this->testSFDClogin = $this->testSforceConnection ->login($this->USERNAME, $this->PASSWORD.$this->Token);

        $_SESSION['location']=$this->testSforceConnection ->getLocation();
        $_SESSION['sessionId']=$this->testSforceConnection ->getSessionId();


But I am getting the invalid sesison id. I need to use enterprise because I am inserting into custom object.
I users has Sys Admin access

What to do?