Connection Setup PHP with SAP on Linux
Below I will show what are the steps to create the connection between PHP and SAP. This document seeks to have a guide for implementing the connection between PHP and SAP, for this example implementation is carried out on a linux server openSUSE 11.1, so that you can create a web application to access SAP online.
Installation of the library extension module for PHP SAPRFC
The installation of this extension is performed in the server PHP.
The installation was performed on a system with opensuse 11.1 of 32 bits. The installation of the library “extension module for PHP SAPRFC” was taking PHP Version 5.2.6 installed, Apache version 2.2.8 and Linux kernel 220.127.116.11-0.2-pae i686.
The installation of the library will be done using the method of construction of the extension SAPRFC as a dynamic module without recompiling PHP.
STEP BY STEP INSTALLATION
To carry out the correct installation of the module require the following programs, except the SAP RFCSDK installing them is by yast:
- Apache and php.
- php-devel package for installation as a dynamic modulus saprfc
- GNU tools (compat, autoconf, automake, flex, libtool, gcc, m4, make)
- Non-Unicode SAP RFCSDK 6.20 for your platform here RFC_43-20000055_SDKLinux_on_IA32_32bit.SAR (this program is downloaded from https://service.sap.com/swdc low ).”>WEB AS 6.20 – SAP RFC SDK>).
- SAPRFC download the library for PHP, which is in Sourceforge.
- Download the SAP RFCSDK from SAP, https://service.sap.com/swdc low
- Download the program from ftp://ftp.sap.com/pub/linuxlab/contrib SAPCAR.
- Login as a superuser.
- Unzip RFCSDK SAP 6.20, with the command:
. /SAPCAR-xf-20000055_SDKLinux_on_IA32_32bit.SAR RFC_43
This will create a folder called rfcsdk in the directory where the command was executed.
- Create the folder /usr/sap and there move the folder rfcsdk, thus being /usr/sap/rfcsdk.
mv rfcsdk /usr/sap
- Give permissions to the directory created with the command
chmod-R 755 / usr / sap
- Unzip the sources of the library with the command saprfc
- Run the following commands
The commands generate dynamic php module called saprfc.so which to make ‘make install’ is copied to the folder where dynamic modules are loaded (/usr/lib/php5/extensions).
- In the folder /etc/php5/conf.d/ where are the configuration files of the modules to create the saprfc.ini with the following line:
extension = saprfc.so
- Restart Apache
Would you like to access Full Article?
If you are already a member in this website, Please Click here to loginIf you are not yet a member, Please Click here to Sign up
New NetWeaver Information at SAP.com