For connect SAP from php program you have to install saprfc which you can download here http://saprfc.sourceforge.net

Install saprfc on linux you have 2 option, rebuild php with saprfc extension or use dynamic module - this blog using dynamic module for configure saprfc

Install RFCSDK

1. First you have to download SAP RFCSDK from http://service.sap.com/swdc (Support Packages and Patches - Entry by Application Group - Additional Components - SAP RFC SDK)

2. unpack RFC_xxxxxxxxxx.SAR with SAPCAR

3. mv rfcsdk to /opt/rfcsdk

3. set environment variable LD_LIBRARY_PATH=/opt/rfcsdk/lib


Install SAPRFC

1. unpack saprfc-1.4.1.tar.gz

2. cd

3. # phpize
# ./configure
# make
# make install

4. insert line "extension=saprfc.so" in php.ini