cancel
Showing results for 
Search instead for 
Did you mean: 

saprfc on unix

Former Member
0 Kudos

Hi all,

i've got SAPRFC on windows. Works great. I was trying to get it on Unix too. Different distributions(Ubuntu, Gentoo, etc). Everything it's installed like in the INSTALL doc. Unfortunettely when i try to run a test i get "SAPRFC extension not loaded".

On Windows System this error apears if SAPRFC and PHP versions are not like "sisters". Anyway after finding right saprfc module for right php version, it works. But on Unix systems what should i do because there is one single new saprfc module version: 1.4.1 or an old one 1.4.

Can you tell me a hint? Has anyone experineced this kind of problem?

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

SAPRFC for PHP installs smoohly onrecen versions like REDHAT

f you are using FC8 or older versions you may face

libstdc++-libc6.2-2.so.3 => not found

ldd of all the RFCSDK bin giles will show this

Soultion is to install (for FC8)

compat-libstdc++-296-2.96-139.i386.rpm for FC8 by rpmfind

http://rpm.pbone.net/index.php3/stat/4/idpl/9852545/com/compat-libstdc++-296-2.96-139.i386.rpm.html

has this

rfcping provided by SAP in the SDK should be the first test.

ex. rfcping ashost=/H/YOURASNAME sysnr=20

Former Member
0 Kudos

Thanks to Eduard

Former Member
0 Kudos

hi all,

using Koucký Eduard knowledge i finally get it. Thus i will describe my steps for making it working:

Additional steps for installing SAPRFC library on unix systems

Tested on:

Platform: Ubuntu 32 bit

PHP Version: 5.1.6

Apache Version: 2.2.3

Saprfc library Version: 1.4.1

1. verify system BIT (32 or 64)

2. download RFCSDK for your system BIT (6.20 Non-Unicode or 6.40 Non-Unicode)

3. put RFCSDK in /usr/sap/

4. create in /usr/sap/, module directory or any other name (/usr/sap/module/)

5. copy SAPRFC 1.4.1 library in /usr/sap/module/

6. run install (in /usr/sap/module/) process described in INSTALL.txt (saprfc library files)

phpize

./configure

make

make install

7. verify if saprfc.so is installed in default php extension directory

8. verify if rfcsdk librfccm.so is linked with saprfc.so extension Result something like:

linux-gate.so.1 => (0xffffe000)

librfccm.so => /usr/sap/rfcsdk/lib/librfccm.so (0xb7a60000)

libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7920000)

libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb791b000)

librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7912000)

libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb78ff000)

libstdc++-libc6.2-2.so.3 => not found

libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb78d9000)

/lib/ld-linux.so.2 (0x80000000)

9. copy (for eventual problems) librfccm.so to /usr/lib/

10. restart apache

11. enjoy ..drink a beer or somethin’ with alcohool.

Nigel_James
Active Contributor
0 Kudos

Well done on getting it fixed and thanks for sharing the info.

Nigel

Former Member
0 Kudos

HI,

I try to download RFCSDK from sap service but this package is compressed with SAPCAR and SAPCAR for linux don'exist.

How I can extract the RFCSDK on Linux Ubuntu?

Thank's in advance.

Luigi Massa

Former Member
0 Kudos

SAP also offers a tool for unzip SAPCAR files. An it works for linux.

Nigel_James
Active Contributor
0 Kudos

Hey Gabriel - since you solved this do you want to mark it as completed.

Cheers,

Nigel

Former Member
0 Kudos

Oh. Sorry.

Edited by: Gabriel Popa on Feb 7, 2008 2:20 PM

Former Member
0 Kudos

Hi,

Hopefully you will get this message. Was your target SAP system Unicode or non-unicode. We are trying this with a Unicode SAP system, but its not working. When the data is returned in a table format, its getting returned incorrectly.

It would be great to know what your target system was and/or if you have done this before with Unicode?

Thanks.

JP

Former Member
0 Kudos

Hello Jean-Pierre,

we are facing the same problem. Communication works using CODEPAGE == 1401 or 1404 but we get login errors in the test suite if having configured CP 4103 (UTF-16, or any other Unicode CP). We have compiled the PHP module on Ubuntu 8.04 using the 6.20 non-unicode RFCSDK, so far - we'll try doing so using RFCSDK 6.40 non-unicode.

Will keep this thread updated.

If anyone already managed to get SAPRFC->SAP-Unicode working correctly: please post some hints. It might be best to gather the info and send it to Edouard, afterwards, so he can update his READMEs.

Best wishes

Chris

Nigel_James
Active Contributor
0 Kudos

Hi Jean-Peirre,

Not having tried this but I think you are going to have problems with unicode. The PHP driver needs to be upgraded. Having emailed Ed on previous occasions he is not available to work on it any further beyond providing new compilations for new php releases.

Not really the answer you are looking for. I am hoping for a company with a vested interested in selling PHP in the enterprise (read Zend) is going to take up the batton and help integrate it for us.

Alternatively you could learn C and grab Sara Golemans extending PHP book, grab the rfc doco from SAP and upgrade it yourself.

Cheers,

Nigel

gregorw
Active Contributor
0 Kudos

Hi Chris,

the solution that worked for me at a client site was to compile SAPRFC 1.4.1 against the NON-Unicode RFCSDK 6.40 and set the Codepage to 1100.

But if you have a Budget and want to contribute to the Open Source community I want to add this to Nigel's suggestion:

Contact Piers Harding who works for [http://uncompany.co.nz/] and has written the SAP RFC connectors using the new SAP NetWeaver RFC SDK for Pearl, Ruby and Python. Perhaps he can do a real Unicode aware version of SAPRFC for PHP.

Best regards

Gregor

Former Member
0 Kudos

Hi Gregor,

we got it working now by compiling against 6.20 non-unicode SDK, connecting via codepage 1404 (needed here) and converting all incoming form data from UTF-8 (website encoding) to ISO-8859-1 (BAPI connection encoding). The final conversion (ISO back to UTF-8) is done in the BAPI, then.

The PHP module did compile linking against the 6.40 non-unicode SDK, but PHP function calls did throw "missing symbol" errors...d'oh. I just love binary-only libs.

We are now using this constellation successfully in this scenario:

  • importing data into a UTF8 website system from BAPI (works, but special characters are replaced by "#") - working on this one...

  • submitting data (orders, ...) from UTF8 website into SAP by BAPI call (works completely, incl. special chars)

To summarize all this:

  • you cannot connect from PHP SAPRFC to a unicode SAP system using the correct unicode codepages

  • you can connect using a non-unicode codepage, though

  • then, you need to have an eye on the different locations in your client/server code where data needs to be transformed

Cheers and thanks for your comments,

Chris

Former Member
0 Kudos

...and one more thing to note:

I think the way to go in the future is to drop direct SAPRFC communication and instead use Netweaver's SOAP capabilities.

Cheers,

Chris

Former Member
0 Kudos

I think the way to go in the future is to drop direct SAPRFC communication and instead use Netweaver's SOAP capabilities.

very good idea! you don't have all those problems using webservices and SOAP.

have fun,

anton

Former Member
0 Kudos

Perhaps some of you experts will get this and help me get around this problem. So here we go, I am not a Unix/Linux guy, but I have this situation where I need to use SAPRFC on our Linux box to connect to ECC.

I have read through this post and followed that I have to compile some of the codes on Unix. Is the same on Linux too? If yes, can someone please help me on where,how and what to compile on this linux box.

Also, where do I get this install document mentioned in this post.

Here is my post

Any help will be deeply appreciated.

Former Member
0 Kudos

i've made some work arround. It seams that my compiled saprfc.so library it's not good.

does anybody have a good library to download from?

Former Member
0 Kudos

building it on Unix? i can't get the idea? are you talking about rebuild php with saprfc?

i will explain just for 2 sec my steps for installing it. maybe you will have a clue:

1. i've extracted SAP RFCSDK to /usr/sap/rfcsdk directory

2. Extract source tarball 1.4.1 to /usr/sap/module

3. in /usr/sap/module/ :

- phpize

- ./configure

- make

- make install

4. Enabled saprfc extension editing your php.ini

5. Restart apache

Nigel_James
Active Contributor
0 Kudos

Yes this is what I meant but if that's not working I have no more information until I can try it myself.

Nigel

Former Member
0 Kudos

So..nobody has a hint. Nobody experienced this kind of trouble? Guys..pls...any idea...????

Former Member
0 Kudos

Sorry no - Gregor you? Oh wait he's on vacation perhaps next week he will take a look I think he's tried on Unix.

Nigel_James
Active Contributor
0 Kudos

I haven't tried it either but i believe it is developed on unix and recompiled on windows. That of course could be a vicious rumour.

Have you - dare I ask tried building it on Unix. I the instructions are pretty clear, from memory.

HTH

Nigel