Skip to Content
avatar image
Former Member

Help! How to connect PHP with SAP Business One [SBO]

Hello, I'm trying to connect php with SAP using the COM("") but I just get an error -10 which I have searched in the web but I have not founded it, following, I leave my code:


echo "SAP SBO PHP TEST<br>";

$vCmp=new COM("") or die ("No connection");

$vCmp->Server = "IPAddress:Port";

$vCmp->LicenseServer = "https://IPAddress:Port";

$vCmp->DbServerType = 9; //9 for dst_HANADB

$vCmp->DbUserName = "SYSTEM";

$vCmp->DbPassword = "*******";

$vCmp->CompanyDB = "DatabaseName"; //HANA DB used

$vCmp->Username = "Username";

$vCmp->Password = "*******";

$vCmp->Language = 3; //3 for English

$vCmp->UseTrusted = false;

$lRetCode = $vCmp->Connect;

if($lRetCode != 0){

echo "Error: ".$lRetCode;


echo "Connected successfully";


//I will be very grateful if you can help me to solve this problem

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers