Reputation: 5437
I've tried a lot of things given over the internet to setup SAPRFC in Windows but they all are talking about PHP 5.2 version but everyone knows that we are using PHP 5.x nowadays.
I'm running Xampp server where my PHP version is 5.4.4 and I need to communicate with SAP server through PHP script. I've tried the procedure of copying librfc.dll
in system32
folder and php_saprfc.dll
in php/ext
folder and also modification of php.ini
but it doesn't help me.
I have followed these steps:
Installation:
saprfc-$VERSION$-$PHP_VERSION$.zip
php-saprfc.dll
to your extensions directory (e.g. C:\PHP\extensions
)php.ini
file (in Windows system directory, e.g. C:\WINNT, C:\WINDOWS
) and add line: extension=php_saprfc.dll
librfc32.dll
(from SAPGUI install CD) to the Windows system directory or simple install SAPGUI on your machine.Compilation:
Extract php sources to C:\PHP-x.y.z
Extract php win support files to C:\PHP-x.y.z\win32
Install RFCSDK to C:\PHP-x.y.z\rfcsdk
Copy SAPRFC sources to C:\PHP-x.y.z\ext\saprfc
Copy php4ts.lib
or php5ts.lib
(from PHP binaries) to C:\PHP-x.y.z\win32
For PHP5 copy saprfc.dsp5
to saprfc.dsp
Open project C:\PHP-x.y.z\ext\saprfc\saprfc.dsp
in Microsoft Visual C++ 6.
Under Tools|Option|Directory set path for Include files and for Library files:
(C:\PHP-x.y.z\win32\include; C:\PHP-x.y.z\rfcsdk\include;
C:\PHP-x.y.z\win32\lib; C:\PHP-x.y.z\rfcsdk\lib)
Set active configuration to "saprfc - Windows_TS" (under Build menu)
Build php_saprfc.dll
.
Compiled DLL you find in C:\PHP-x.y.z\Release_TS directory
But I'm not getting the compilation part.
Upvotes: 1
Views: 3189
Reputation: 11
You can download precompiled version here: https://sourceforge.net/projects/saprfcsapnwrfc/files/
Upvotes: 0
Reputation: 2641
The newest version is from 2009 and can be found here. For newer PHP versions you have to compile the extension yourself (at least the docs say so). Seems like the devs didn't make the jump to the newer versions because of the compiler needed. In the compilation docs it still says Microsoft Visual C++ 6.0. AFAIK modern PHP uses 9.0. So you propably need to tinker a bit with it. Or you might ask in the SAP forums if someone did the necessary work already.
Upvotes: 0