jsoumelidis / php_sap

PHP (5.6, 7.x) extension for SAP Remote Function Modules invocation
GNU General Public License v2.0
5 stars 1 forks source link

Pre-built extension #3

Closed durlaniulian closed 6 years ago

durlaniulian commented 6 years ago

Hello,

Can you help me with a pre-build extension for PHP 7.0. I tried to build it using the steps in the description but it gave me some errors.

Thank you. Iulian Durlan

jsoumelidis commented 6 years ago

Hi @durlaniulian , Can you please provide the output of make (or nmake if using Windows)?

durlaniulian commented 6 years ago

C:\php-sap>nmake

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0 Copyright (C) Microsoft Corporation. All rights reserved.

    "cl.exe" /DHAVE_PTHREAD_H=0 /I "C:\nwrfcsdk\include" /DHAVE_SAPNWRFC_H=1 /FI main/config.pickle.h /D COMPILE_DL_SAP /D SAP_EXPORTS=1 /nologo /I C:\phpize/include /I C:\phpize/include/main /I C:\phpize/include/Zend /I C:\phpize/include/TSRM /I C:\phpize/include/ext /D _WINDOWS /D WINDOWS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 /D _USE_MATH_DEFINES /FD /wd4996 /D_USE_32BIT_TIME_T=1 /guard:cf /Zc:inline /MP /LD /MD /W3 /Ox /D NDebug /D NDEBUG /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0 /D ZTS=1 /I "C:\php-sap\no\include" /FoC:\php-sap\Release_TS\\ /FpC:\php-sap\Release_TS\\ /FRC:\php-sap\Release_TS\\ /FdC:\php-sap\Release_TS\\ /c php_sap-7.1-dev\php_sap.c

php_sap.c php_sap-7.1-dev\php_sap.c(123): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(129): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(227): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(233): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(239): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(245): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(251): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(257): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(263): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(269): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(275): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(308): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(314): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(320): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(326): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(334): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX' php_sap-7.1-dev\php_sap.c(334): error C2099: initializer is not a constant php_sap-7.1-dev\php_sap.c(342): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(361): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(367): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(374): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(380): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(387): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(393): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(413): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(419): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' php_sap-7.1-dev\php_sap.c(430): warning C4002: too many actual parameters for macro 'ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe"' : return code '0x2' Stop.

jsoumelidis commented 6 years ago

You have cloned the 7.1-dev branch. You should have cloned 7.0-dev branch for PHP 7.0. Please retry and let me know.

jsoumelidis commented 6 years ago

Here's a .dll for php 7.0.* x86 TS version.

php_sap.zip

BejanCristian commented 6 years ago

Thank you for your relay! I am working with @durlaniulian on this project, we tried using your build with php 7.0.0 and php 7.0.29, still we have a what seems to be a compatibility problem. We would appreciate if you could help us sort this out.

php php-console

jsoumelidis commented 6 years ago

Hi @BejanCristian , It seems that php cannot locate the .dlls required by nwrfcsdk. For example if you have extracted the nwrfcsdk folder to C:\nwrfcsdk, add C:\nwrfcsdk\lib to your PATH system environment variable. For more options take a look at the relevant section of README.md

BejanCristian commented 6 years ago

It is added in system environment variable, and it appears in Apache Environment path.... Could it be something else? Thanks for your quick replay.

sys var path

jsoumelidis commented 6 years ago

Are you sure you got the 32bit (x86) version of nwrfcsdk from SAP Marketplace?

jsoumelidis commented 6 years ago

Please also check that sapnwrfc.dll and libsapucum.dll exists in C:\nwrfcsdk\lib

BejanCristian commented 6 years ago

Yes, the are in C:\nwrfcsdk\lib and the nwrfcsdk documentation says it supports WINDOWS 7, 8.x, 10 32/64-BIT ....

jsoumelidis commented 6 years ago

It's not one package that supports both x86 and x64 architecture. You have to download the windows x86 NWRFC. I'll try to locate the exact filename you have to download.

BejanCristian commented 6 years ago

You where right, we needed x86 NWRFC. We managed to load the sap library after we replaced the nwrfcsdk/lib

Thank you for all your support.

jsoumelidis commented 6 years ago

Great news :) I suggest to take a look at the examples directory and here if you are using an IDE for development for autocomplete support.

durlaniulian commented 6 years ago

Hello @jsoumelidis , Thank you for your all support. I have this error and i think that is from the sap rfc user. Can you help me please?

System not available (RFC_COMMUNICATION_FAILURE) LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner 'IP:3300' not reached TIME Tue Oct 10 15:25:05 2017 RELEASE 720 COMPONENT NI (network interface) VERSION 40 RC -10 MODULE nixxi.cpp LINE 3283 DETAIL NiPConnect2: IP:3300 SYSTEM CALL connect ERRNO 10060 ERRNO TEXT WSAETIMEDOUT: Connection timed out COUNTER 236

durlaniulian commented 6 years ago

Update: Problem solved. I had to modify the entry of ashost in sap_config.php. Thank you for your support @jsoumelidis .

jsoumelidis commented 6 years ago

You are trying to connect to a host named "IP" which is obviously invalid. You have to provide correct logon parameters.

jsoumelidis commented 6 years ago

Oh, did not see your later comment :)