cancel
Showing results for 
Search instead for 
Did you mean: 

Error DBServerType SAP 9 DI API: Database server type not supported (-119)

Former Member
0 Kudos

Hello,

I have the following problem;

...in DI API version 8.82 PL11 can usually connect via PHP:

$oComp = new COM("SAPbobsCOM.Company") or die("No connection");

$oComp->Server="IP\\INSTANCE";

$oComp->LicenseServer = "IP:Port";

$oComp->DbUserName = "user";

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

$oComp->DBServerType = "7";

$oComp->UserName = "user";

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

$oComp->CompanyDB = "SBODemoUS";

try {

    echo $oComp->Connect;

    echo "<br><br>";

    $oComp->StartTransaction();

} catch (com_exception $expt) {

    echo $expt->getMessage();

    echo "<br><br>" . $oComp->GetLastErrorDescription;

}

Note: MSSQL2012

In the case DI API 9.0 PL13 features the same connection the following error:

-119

Source: SAPbobsCOM.Company.90.0

Description: You are not connected to a company

Database server type not supported

Note: Both cases IIS environment

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Eric,

In addition to adding

[PHP_COM_DOTNET]

extension=php_com_dotnet.dll

to your php.ini file, you have to tell PHP where to look for the extension, and to enable extensions.

Where to look for extensions (Windows):

uncomment (remove the leading ";")

extension_dir = "ext"

<<<<<< OK up here!

Enable extensions:

Set the enable flag to On:

enable_dl = On

The problem was exactly the activation of this extension

Regards, Lucio

Former Member
0 Kudos

Did this, but I stupidly assumed that you know more than me on PHP, so I forgot to tell.

If solved, you just have to close the thread

Glad to have helped anyway, I learned some stuff.

Regards,

Eric

Former Member
0 Kudos

Are mere apprentices learned .. my partner every day.

Big hug and thank you!

Regards, Lucio

Answers (3)

Answers (3)

Former Member
0 Kudos

What kind of permission you applied?

What other settings you made in IIS environment?

Former Member
0 Kudos

As I said, I changed the permissions on the PHP folder and wwwroot, to give full access to users and the IUSR_.

In IIS at the end, I changed nothing: just removed all my tests with PHP, IISReset from the command line, and reconfigure properly the PHP FastCGI interface.

Regards,

Eric

Former Member
0 Kudos

Eric, In all the versions I'm being 5.3 to 5.6 have the same problem.

The version 8.82 is functioning normally in this environment - and the version 9 also worked in the old environment.

Not mentioned, but the old environment is W2k8 with the new environment and W2012.

The problem is not necessarily the SQL Server, but the native client or Windows itself. Because the version of the OS is 64bit - observe a small problem, but have not found the real problem.

hugs, Lucio

Former Member
0 Kudos

Hi,

Good news: I am able to instantiate a COM object with 5.6.2, so now I am able to test.

Will come back soon (I hope).

Regards,

Eric

Former Member
0 Kudos

Hi Lucio,

I was able to make it work Under PHP 5.6.2.

My config. is:

  • Windows 2008R2 (64 bits),
  • SQL-Server 2008R2 (64 bits),
  • B1A 9.0 PL11 32 bits,
  • PHP 5.6.2 32 bits.

My biggest issue was to make PHP to accept to instantiate a COM object, which was due to how I declared the extension in IIS, and it works both by forcing the processor model (32 or 64) of the CGI module from IIS.

In my code, I'm using exactly the same parameters as I do in other languages, so no DbUserName and all addresses are used as IP.


try {

$oComp = new COM("SAPbobsCOM.Company");

$oComp->Server = "192.168.90.118";

$oComp->LicenseServer = "192.168.90.118:30000";

$oComp->DBServerType = "6";

$oComp->UserName = "manager";

$oComp->Password = "Kuldip";

$oComp->CompanyDB = "DB_Test_Deli";

$return = $oComp->Connect;

if (0 == $return) {

echo "CompanyName: " . $oComp->CompanyName;

$oComp->Disconnect();

} else {

echo $return . "

" . $oComp->GetLastErrorCode . $oComp->GetLastErrorDescription;

}

} catch (com_exception $expt) {

echo "An error occured";

echo $expt->getMessage();

echo $oComp->GetLastErrorDescription;

} catch (exception $expt) {

echo $expt->getMessage();

}

Regards,

Eric

Former Member
0 Kudos

So, definitively this is in the difference of configuration:

Win 2008R2 versus Win2012R2 and SQL2008R2 versus SQL2012.

What else I did, was to force the authorizations on the misc. folders used by PHP (and include the IUSR_ and giving it full access).

Regards,

Eric

Former Member
0 Kudos

And the image:

Regards,

Eric

Former Member
0 Kudos

Great, I also got this result.

I also got hit with W2K8 and SQL 2012.

If I try to connect with w2012, SQL 2012, IIS 5.6 and PHP: -226 -226 - The specified resource name cannot be found in the image file.

Former Member
0 Kudos

Hi Lucio,

I had this error several times, but it was because I had extra characters on the definition of the server address.

I'm not fluent in PHP, but the \\ cannot be replace by a single \ ?

You have no ways to test with the default instance?

Regards,

Eric

Former Member
0 Kudos

Hi Eric, Yes, I am testing in various ways .. either with \\ or \; IP or DNS ..

Former Member
0 Kudos

Yes, but with a named instance...

I don't remind which, but there is one of the components of the Platform which doesn't accept named instances. Not the same component, I know, but the issue is similar.

May you use the c:\windows\SysWOW64\cliconfg.exe program, to create a local alias to your instance, and in the server field, to use this alias instead of the IP-DNS\INSTANCE?

Regards,

Eric

Former Member
0 Kudos

Hi Lucio,

Since V9.0 in one case and 8.82 in the other: using 32 bits (with the corresponding DI-API) processes in both cases?

Regards,

Eric

Former Member
0 Kudos

Version 8.82 works normally; in the case of v9 - gives the above error... (DI version 32bits)

Former Member
0 Kudos

If the uninstall v9 and install the v8.82 it works perfectly.

I did not install the DI API / 64bit!

Former Member
0 Kudos

Hi Lucio,

I don't have any sample Under the eyes right now, but try with the name of the enum (dst_MSSQL2012) and not its value.

Regards,

Eric

Former Member
0 Kudos

By the way, this is always what I'm using with B1WS and since it is using DIS...

Regards,

Eric

Former Member
0 Kudos

Eric, using dst_MSSQL2012 - Fatal Error.

Notice: Use of undefined constant dst_MSSQL2012 - assumed 'dst_MSSQL2012'

Former Member
0 Kudos

Lucio,

Will do a test... But have to install PHP (not a usual config for me).

In the meantime, I have to learn how to read:

  • You can remove the dbUsername and dbPassword (they are optional since you are referencing the LincenceServer),
  • And having written the previous: is the DB server correctly referenced Inside the SLD which is used by the referenced LicenceServer?

Regards,

Eric

Former Member
0 Kudos

Eric,

1. If you remove the DbUserName and DbPassword the following error appears. - Unable to find the specified resource name in the image file.

2. Yes! the SLD is configuring correctly.. even in use.

Former Member
0 Kudos

... error -226

Former Member
0 Kudos

Both errors (-119 and -226) are undocumented, but the fact of removing parameters indicates something which is different.

May you try to generate proxies from a VisualStudio (if needed, I can provide them) installation and use them insteat of referencing directly the COM objects?

Again, I have to read: DI not DIS, so definitively 7 and not the enum name,

Will definitively have to install PHP and do a test.

Regards,

Eric

Former Member
0 Kudos

Eric, send me.

I've tried various ways and from various sources, but really did not recognize the change.

Hug, Lucio

Former Member
0 Kudos

Hi Lucio,

Fighting a bit to make PHP working on my VM...

In the meantime, was thinking: the data misalignment you had is (at least for me) a clear sign of a mismatch between the COM proxies you are using and the EXE which is calling them.

Since you are on DI 32 bits, what version of PHP are you using? a 64bits or a 32? In your case, it has to be a 32 bits version.

Regards,

Eric

Former Member
0 Kudos

Hi Eric..

DI / PHP 32bits.. intriguing is the DI 8.82 connecting normally.

Regards, Lucio

Former Member
0 Kudos

Eric, new error.. "Failed to connect or logon to SLD, please check connection parameters and configure file"

Former Member
0 Kudos

Hi Lucio,

This one I prefer, I know how to handle it easily

Service Manager, Licence Service, then try to open the SLD from the bottom left button.

If an issue with it, then catch me privately and we will do a short TeamViewer session (or whatever else) to fix it.

Regards,

Eric

Former Member
0 Kudos

The error is on the IIS server - in his setup...

Another change is the way of indicating the license - we can not use the IP; worked with the hostname. Now I'm hunting for the problem in IIS.

Former Member
0 Kudos

Surprising about the IP, this is the only thing I am using: I just refuse to use DNS names, too many problems.

Anyway. WHat I've found in my research, is that you have to change the default Application Pool in IIS to let it accept 32 bits processes.

IIS / Application Pool, select the default (which should be associated to the default web site), then Extended properties on the top right menu, and change the property Accept 32 bits processes from false to true.

Then IISReset from a DOS box...

Regards,

Eric

Former Member
0 Kudos

I've done it, though .. Service Unavailable

HTTP Error 503. The service is unavailable.

Former Member
0 Kudos

Annoying...

You have installed:

  • B1 in 32 bits,
  • PHP in 32 bits,

When you force IIS to allow calling 32bits extensions it doesn't work and when you don't do it, you have a misallignment in memory (which is globaly a problem of calling convention).

You are sure to not have somewhere on this machine a 64 bits package of PHP which is called in place of the 32bits you installed?

Regards,

Eric

Former Member
0 Kudos

Eric, i created a new server; only b1 32bits and 32bits php 5.6; native client sql server 2012 32bit and yet: Database server type not supported.

I changed the pool to 32bit

Former Member
0 Kudos

Sorry,I'm trying to understand.

SQL-Server is not the issue, else I would be really surprised.

I have read somewhere, that for fatsCGI and COM invocation, it was better to go down to PHP 5.3 and in all cases for a thread unsafe version.

Is it something you can try?

I'm having trouble to create COM objects from PHP to test your problem. Before I'm spending my night on it, do specific setting have to be put Inside the php.ini file?

Regards,

Eric