August 22nd, 2011 by Gia

Download following items :

  • re2c (yum install re2c)
  • SAPRFC, download here.
  • SAPCAR, download from SAP Service Support Portal  (Software Download > Support Packages and Patches > Additional Components > SAPCAR > SAPCAR 7.10 > Windows Server on x64 64bit). Download for Windows 64bit, this tool for extract SAR file.
  • Non-Unicode SAP RFCSDK 6.20 or 6.40, download from SAP Service Support Portal  (Software Download > Support Packages and Patches > Additional Components > SAP RFC SDK > SAP RFC SDK 6.40 > Linux on x86_64 64bit ). Extract using SAPCAR in Windows 64bit. Copy rfcsdk folder to Linux server.
  • librfc, download from SAP Service Support Portal  (Software Download > Support Packages and Patches > Additional Components > SAP Kernel > SAP Kernet 64-BIT > SAP KERNEL 6.40 64-BIT > Linux on x86_64 64bit > #Database independent). Extract using SAPCAR in Windows 64bit. Copy librfccm.so file to Linux Server.

* Extract SAR file using SAPCAR :
C:\>SAPCAR_[version].exe -xvf [SAR filename].sar

[root@down ~]# wget http://nchc.dl.sourceforge.net/project/saprfc/saprfc/1.4.1/saprfc-1.4.1.tar.gz
[root@down ~]# tar -zxf saprfc-1.4.1.tar.gz
[root@down ~]# cp -R saprfc-1.4.1 /usr/src
[root@down ~]# mkdir /opt/SAP
[root@down ~]# cp -R rfcsdk /opt/SAP/
[root@down ~]# cp librfccm.so /opt/SAP/rfcsdk/lib/
[root@down ~]# cd /usr/src/saprfc-1.4.1
[root@down saprfc-1.4.1]# export SAPRFC_DIR=/opt/SAP/rfcsdk/
[root@down saprfc-1.4.1]# export PATH=$SAPRFC_DIR/bin:$PATH
[root@down saprfc-1.4.1]# phpize
[root@down saprfc-1.4.1]# ./configure
[root@down saprfc-1.4.1]# make
[root@down saprfc-1.4.1]# make install
[root@down saprfc-1.4.1]# vi /etc/php.d/saprfc.ini (add this line -> extension=saprfc.so )
[root@down saprfc-1.4.1]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@down saprfc-1.4.1]# vi /var/www/html/test.php (add this line -> <?php phpinfo();?> )

Access file test.php from browser, if saprfc sucessfuly installed, in PHP info page saprfc module must shown as below.


Comments

comments

Tags: ,
Posted in PHP, Programming, SAP | 16 Comments »
16 Responses to “SAPRFC + PHP 5.2.10 + CentOS 5.4 64bit”
Prajay Verenkar says:

kindly help me in solving this issue.

completed following steps

Downloaded rfcsdk 7.20 and uploaded in /usr/local/rfcsdk
Uploaded librfccm.so patch in rfcsdk/lib
Extracted saprfc-1.4.1 in my root directory
edited file saprfc-1.4.1/saprfc.c (on line no.47 changed function_entry to zend_function_entry )
in saprfc-1.4.1 executed following command
phpize
./configure
make
make install
added extension=saprfc.so in php.ini file
sudo service apache2 restart

when i checked phpino page it oly showed me – /etc/php5/apache2/conf.d/20-saprfc.ini in Additional .ini files parsed section no other details of saprfc enabled

Gia says:

Hi Prajay, please make sure saprfc.so file already exists.

Prajay Verenkar says:

Hi Gia,

saprfc.so does not exist in default php extension directory.

After make install i got that following line
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20131226/

Prajay Verenkar says:

Hi Gia,

i forgot to tell u my system specification

linux 4.0.4-x86_64 (ubuntu14)

Prajay Verenkar says:

Hi Gia,

updated php.ini file
extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/saprfc.so

sudo service apache2 restart

following error i am getting in /var/log/apache2/error.log

caught SIGTERM, shutting down
PHP Warning: PHP Startup: saprfc: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20121212/saprfc.so’ – librfccm.so: cannot open shared object file: No such file or directory in Unknown on line 0

Gia says:

“/usr/lib/php5/20121212/saprfc.so” are you sure saprfc.so file exist in that directory?

Prajay Verenkar says:

phpinfo page saprfc module not shown

i have installed saprfc-1.4.1 on linux 4.0.4-x86_64 (ubuntu14) machine.

Steps Completed

Downloaded rfcsdk 7.20 and uploaded in /usr/local/rfcsdk
Uploaded librfccm.so patch in rfcsdk/lib
Extracted saprfc-1.4.1 in my root directory
edited file saprfc-1.4.1/saprfc.c (on line no.47 changed function_entry to zend_function_entry )
in saprfc-1.4.1 executed following command
phpize
./configure
make
make install
added extension=saprfc.so in php.ini file
sudo service apache2 restart
After doing these all steps in phpinfo page saprfc module was not shown.

In Additional .ini files parsed section in phpinfo page saprfc.ini path was mentioned

– /etc/php5/apache2/conf.d/20-saprfc.ini

Paul Aviles says:

Aya, the error “Warning: PHP Startup: Unable to load dynamic library ‘/usr/src/saprfc-1.4.1/modules/saprfc.so’ – libstdc++.so.5: cannot open shared object file: No such file or directory in Unknown on line 0” is and indication that you have SELINUX enabled. It is not recomended, but for testing you can disabled it using:

# echo 0 >/selinux/enforce

Restart apache using:
# service httpd restart

Look at the httpd error log under /var/log/httpd/error_log and the error should be gone. If you get an error about compat-libstdc++ you can install it using:

# yum install compat-libstdc++-33

Hope this helps someone.

Paul Aviles

Prajay Verenkar says:

Hi Gia,

/usr/lib/php5/20121212/saprfc.so is missing.

i updated php.ini
extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/saprfc.so

and i m getting following error

caught SIGTERM, shutting down
PHP Warning: PHP Startup: saprfc: Unable to initialize module\nModule
compiled with module API=20131226\nPHP
compiled with module API=20121212\nThese options need to match\n in Unknown on line 0

Prajay Verenkar says:

Finally i was able to figure out my issue.
There were 2 PHP installed on my machine. i used following command and it worked

which php (to find php is being used) it returned me /usr/bin/
which phpize returned me /usr/bin/phpize

* ./configure –with-php-config=/usr/bin/php-config
* make
* make test
* make install

Aya says:

A year after the initial post, but i hope i still get an answer. I am trying to get this working on centos 6.5 with php 5.4.

everyting seems to go as it should but i get the following errormessage when starting php:

Warning: PHP Startup: Unable to load dynamic library ‘/usr/src/saprfc-1.4.1/modules/saprfc.so’ – libstdc++.so.5: cannot open shared object file: No such file or directory in Unknown on line 0

Gia says:

Hi Aya,

Please make sure saprfc.so file already exists in ‘/usr/src/saprfc-1.4.1/modules/’ and check a permission file.

Regards,
Gia.

alfa says:

Hi,

can you provide to me rfcsdk 6.20 / 6.40 & sapcar package?
because I don’t have login.

Thanks & Regards,

Alfa

Gia says:

Hi Alfa :)

I’m sorry i can’t provide RFCSDK and SAPCAR package, i’m lost those files :(
And now i can’t login to SAP Service Support Portal again :(

Gia

Simone says:

How About Centos 6.4? I’m a newbie and installing on it with your procedure seems doesn’t works.
Do you have any experience in it?
Thanks

SR

Gia says:

Hi Simone,

I’ve never tried install in CentOS 6.4

Which step in my procedure doesn’t work?
Are you got some error when make/make install or you can analyze your httpd error.log.

HTH

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.