gkralik / php7-sapnwrfc

SAP NW RFC SDK extension for PHP 7.3+ & PHP 8
https://gkralik.github.io/php7-sapnwrfc
MIT License
90 stars 35 forks source link

Error when compile with PHP 8.3.9 #160

Closed wukongrita closed 3 months ago

wukongrita commented 3 months ago

Bug Report

Q A
PHP version 8.3.9
SAP NW RFC SDK version NWRFC_53-20004565
Extension version/git ref 2.1.0

Summary

Hi, I got error when compiling this extensions:

/mnt/ed9a84fe-d4bf-4fe3-a25a-81e782cc7be2/Installer/PHP/SAP/php-sapnwrfc/sapnwrfc.c: In function ‘zim_Connection_setGlobalLogonTimeout’:
/mnt/ed9a84fe-d4bf-4fe3-a25a-81e782cc7be2/Installer/PHP/SAP/php-sapnwrfc/sapnwrfc.c:788:10: error: implicit declaration of function ‘RfcSetGlobalLogonTimeout’ [-Wimplicit-function-declaration]
  788 |     rc = RfcSetGlobalLogonTimeout((unsigned)timeout, &error_info);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/sap/nwrfcsdk/include/sapnwrfc.h:9,
                 from /mnt/ed9a84fe-d4bf-4fe3-a25a-81e782cc7be2/Installer/PHP/SAP/php-sapnwrfc/string_helper.h:10,
                 from /mnt/ed9a84fe-d4bf-4fe3-a25a-81e782cc7be2/Installer/PHP/SAP/php-sapnwrfc/sapnwrfc.c:21:
/usr/sap/nwrfcsdk/include/sapuc.h: At top level:
/usr/sap/nwrfcsdk/include/sapuc.h:855:24: warning: ‘sccsidU16’ defined but not used [-Wunused-variable]
  855 |   static const SAP_UC* sccsidU16 = NULL;
      |                        ^~~~~~~~~
make: *** [Makefile:210: sapnwrfc.lo] Error 1

Any help needed...

Thx

gkralik commented 3 months ago

The extension requires the latest SAP NetWeaver RFC SDK 7.50 for building.

NWRFC_53-20004565 is not a version number.

wukongrita commented 3 months ago

Ow... the NWRFC_53-20004565 is the file name of the .SAR and I already extracted .SAR to /usr/sap/nwrfcsdk.

I try to execute:

./startrfc -v
NW RFC Library Version: 721 Patch Level 53
Compiler Version:
4.1.2 20070115 (SAP release 20121030, based on SUSE release)
Startrfc Version: 2018-08-15

and by that, it means the file is still at the 721 version of the SDK ?

gkralik commented 3 months ago

NW RFC Library Version: 721 Patch Level 53

This is not supported by the current extension version, as stated in the README. Use SDK version 7.50 (750), it is fully backwards compatible.