Skip to Content
0
Jan 14, 2020 at 01:49 AM

Problem with DI API - PHP Connection

78 Views Last edit Jan 14, 2020 at 01:26 AM 2 rev

Hello guys, I'm new to this world of third app SAP. I'm trying to create a connection from PHP website to SAP to make an order or create a new client.

I have the same DI API installed on the server SAP and on the WebServer,

I opened all the ports from the SAP Server to the WebServer (I can connect to the MSSQL Database without any problem),

I'm using the name of the server not the IP (Mapped from host file on Windows).

I'm using this code:

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

$vCmp->DbServerType = 7;

$vCmp->DbUserName = "sa";

$vCmp->DbPassword = "xxxxx";

$vCmp->server = "xxx";

$vCmp->username = "UWEB";

$vCmp->password = "xxxx";

$vCmp->CompanyDB = "xxxxx";

$vCmp->LicenseServer = "xxx:30000";

//$vCmp->SLDServer = "https://xxx:30010";

I'm on SAP B1 9.1

After all of these, I'm getting this error:

Maximum execution time of 30 seconds exceeded


Do you have any idea? I'm a little bit desperateright now.

Thanks guys!