0

I need to install SAP RFC extension on my PHP with XAMPP Control Panel

My PHP version is 5.6

What I've done :

  • Download php_saprfc.dll and librfc32.dll
  • Copy librfc32.dll on my C:/Windows/System32/
  • Copy librfc32.dll on my C:/Windows/SysWOW64/
  • Copy php_saprfc.dll to E:/xampp/php/ext (i install xampp to E:)
  • Then added "extension=php_sapfrc.dll" on my php.ini
  • Then restart my apache service from XAMPP control Panel

Then open phpinfo, the saprfc information not listed

Tried saprfc :

sapnwrfc-0.11.zip
saprfc-1.4.1.All.zip
saprfc-1.4.1.zip

No one works, am I missing something?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

3 Answers3

1
  1. All I say here is for the client side. SAP server side all corresponding dlls for all versions of client-side calls for nwrfcsdk and for rfcsdk are up to date if the SAP SPs and the patches are maintained.
  2. The new SAP nwrfcsdk and the old SAP rfcsdk are two different things for the same client-side tasks.

2a. You downloaded the very old phpsaprfc dlls from E. Koucky compilation(2009) 1.4.1, which is for SAP rfcsdk 7.2 (7.4 is the last supported by SAP for the old rfcsdk) and not for all 5.6.x Php versions. Don't get confused of the version numbers of the SAP rfcsdk for they are similar to the new PHP version numbers(7.2/ 7.1.11/ etc.)

2b. You downloaded the new SAP nwrfcsdk too, which is normally compiled for
PHP versions >= 7 (P.Harding) the same for ( G.Kralik etc.).The new 7.5 SAP GUI does only support the new SAP nwrfcsdk - there are php sapnwrfcsdk extension solutions for that too/ Piers Harding and others...)

  1. For the old SAP rfcsdk you need a special phpsaprfc.dll for each php-version depending with what version of rfcsdk it is compiled(7.0/7.1/7.2/7.3/7.4). If you use for example PHP 5.6.9 those dll's are (normally) compiled together with the SAP rfcsdk 7.4.

  2. only this combination will work in this case

  3. you can find further instructions down here. I compiled an extension version for PHP 7.1.11 too (7.2 will follow)

Get the x32 nts dll for php 5.6.x up to 7.1.11 here: https://sourceforge.net/projects/saprfcsdk/files/PHP%207.1.11%20NTS%20VC14%20%20SAP%20GUI%207.4%20-%20x32%20%20NUC/

These compiles depend on sap rfcsdk 7.40 - no other version will work. The installation is described here: https://sourceforge.net/p/saprfcsdk/wiki/SAP-RfcSdk%20-%20Axel%20Arnold%20Bangert%20-%20Gimba%20-%20Herzogenrath%202018/

Please report problems here: https://sourceforge.net/p/saprfcsdk/discussion/general/thread/2777c557/?limit=25#f5bb

1

This is the best tutorial and with all required information. tutorial for installation and usage

https://gkralik.github.io/php7-sapnwrfc/introduction.html

Also real time code check:

SAPNWRFC Connection how to WRITE DATA php

  • Could you quote any relevant parts of your links in your answer? As-is, your answer is not a good fit for Stack Overflow, because it's very susceptible to link rot (i.e. if either or both links ever break or change, your answer loses all of its value). – mech Feb 25 '18 at 04:40
  • @mech its my first answer i will improve with briefing soon – Vivan Menezes Feb 25 '18 at 10:14
0

You write wrong the line in your php.ini:

extension=php_sapfrc.dll

Must be

extension=php_saprfc.dll