Closed Axent96 closed 7 years ago
Which version of the NetWeaver SDK do you use?
Version => 1.1.2 SAP NW RFC SDK => 7.11.0
You can see my commit for the problem - https://github.com/vlobovikov/php7-sapnwrfc/commit/d60902d8c598060dee86a959b66449d6cbda3de1
I have never tried to build the extension with a RFC SDK version < 7.20.. I'll have a look when I find some free time. In the meantime you can try to comment out the offending lines, but YMMV.
I will try to make the inclusion of those members conditional on their existence.
You can try the latest version from master
, it should build without error. Make sure to run make test
after a successful build.
Thank you. I had a Problem with sapnwrfc.c too. Functions partnerBytesPerChar & partnerSystemCodepage does not exist. (see my commit https://github.com/vlobovikov/php7-sapnwrfc/commit/d60902d8c598060dee86a959b66449d6cbda3de1 file sapnwrfc.c)
I tried with SDK version 7.11. partnerBytesPerChar
exists for me. But we can easily add a check for it as well.
Perfect! Thank you very much. It works now!
Hi, I tried make a library for PHP 7.1 and got a error. I tried this in two different Systems:
1) PHP 7.1.10-1+0~20170929170818.9+stretch~1.gbp501135 (cli) (built: Sep 29 2017 17:08:20) OS: Linux c026bfe236a2 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 GNU/Linux
Distributor ID: Debian Description: Debian GNU/Linux 9.1 (stretch) Release: 9.1 Codename: stretch
2)PHP 7.1.10-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Sep 29 2017 17:04:25) OS: Linux ubuntu 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial
Error:
/usr/sap/nwrfcsdk/php7-sapnwrfc/sapnwrfc.c: In function 'zim_Connection_getAttributes': /usr/sap/nwrfcsdk/php7-sapnwrfc/sapnwrfc.c:377:121: error: 'RFC_ATTRIBUTES {aka struct _RFC_ATTRIBUTES}' has no member named 'partnerBytesPerChar' add_assoc_str(return_value, "partnerBytesPerChar", sapuc_to_zend_string(attributes.partnerBytesPerChar)); ^ /usr/sap/nwrfcsdk/php7-sapnwrfc/sapnwrfc.c:378:125: error: 'RFC_ATTRIBUTES {aka struct _RFC_ATTRIBUTES}' has no member named 'partnerSystemCodepage'; did you mean 'partnerCodepage'? add_assoc_str(return_value, "partnerSystemCodepage", sapuc_to_zend_string(attributes.partnerSystemCodepage)); ^ /usr/sap/nwrfcsdk/php7-sapnwrfc/sapnwrfc.c: In function 'zim_Connection_setTraceDir': /usr/sap/nwrfcsdk/php7-sapnwrfc/sapnwrfc.c:548:10: warning: implicit declaration of function 'RfcSetTraceDir' [-Wimplicit-function-declaration] rc = RfcSetTraceDir((path_u = zend_string_to_sapuc(path)), &error_info); ^~~~~~~~~~~~~~ /usr/sap/nwrfcsdk/php7-sapnwrfc/sapnwrfc.c: In function 'zim_Connection_setTraceLevel': /usr/sap/nwrfcsdk/php7-sapnwrfc/sapnwrfc.c:578:10: warning: implicit declaration of function 'RfcSetTraceLevel' [-Wimplicit-function-declaration] rc = RfcSetTraceLevel(NULL, NULL, level, &error_info); ^~~~~~~~~~~~~~~~ In file included from /usr/sap/nwrfcsdk/include/sapnwrfc.h:9:0, from /usr/sap/nwrfcsdk/php7-sapnwrfc/exceptions.h:10, from /usr/sap/nwrfcsdk/php7-sapnwrfc/sapnwrfc.c:21: At top level: /usr/sap/nwrfcsdk/include/sapuc.h:840:24: warning: 'sccsidU16' defined but not used [-Wunused-variable] static const SAP_UC* sccsidU16 = NULL; ^~~~~~~~~ Makefile:194: recipe for target 'sapnwrfc.lo' failed make: *** [sapnwrfc.lo] Error 1