SAPRFC + PHP 5.2.10 + CentOS 5.4 64位(php用saprfc连接Isap)
下载下列项目:
- re2c(yum install re2c)
- SAPRFC,在这里下载。
- 从SAP Service Support Portal (软件下载>支持包和修补程序>其他组件> SAPCAR> SAPCAR 7.10> x64 64位上的Windows Server)下载SAPCAR。下载适用于Windows 64bit的此工具以提取SAR文件。
- 非Unicode SAP RFCSDK 6.20或6.40,从SAP Service Support Portal (软件下载>支持包和修补程序>其他组件> SAP RFC SDK> SAP RFC SDK 6.40> Linux on x86_64 64位)下载。在Windows 64位中使用SAPCAR进行提取。将rfcsdk文件夹复制到Linux服务器。
- 从SAP Service Support Portal (软件下载>支持软件包和修补程序>其他组件> SAP内核> SAP Kernet 64位> SAP KERNEL 6.40 64位> Linux on x86_64 64位>#数据库无关)下载。在Windows 64位中使用SAPCAR进行提取。将librfccm.so文件复制到Linux服务器。
*使用SAPCAR提取SAR文件:
C:\> SAPCAR_ [版本] .exe -xvf [SAR文件名] .sar
1
2
3
4
五
6
7
8
9
10
11
12
13
14
15
16
17
18
|
[[email protected] ~] # wget http://nchc.dl.sourceforge.net/project/saprfc/saprfc/1.4.1/saprfc-1.4.1.tar.gz
[[email protected] ~] # tar -zxf saprfc-1.4.1.tar.gz
[[email protected] ~] # cp -R saprfc-1.4.1 /usr/src
[[email protected] ~] # mkdir /opt/SAP
[[email protected] ~] # cp -R rfcsdk /opt/SAP/
[[email protected] ~] # cp librfccm.so /opt/SAP/rfcsdk/lib/
[[email protected] ~] # cd /usr/src/saprfc-1.4.1
[[email protected] saprfc-1.4.1] # export SAPRFC_DIR=/opt/SAP/rfcsdk/
[[email protected] saprfc-1.4.1] # export PATH=$SAPRFC_DIR/bin:$PATH
[[email protected] saprfc-1.4.1] # phpize
[[email protected] saprfc-1.4.1] # ./configure
[[email protected] saprfc-1.4.1] # make
[[email protected] saprfc-1.4.1] # make install
[[email protected] saprfc-1.4.1] # vi /etc/php.d/saprfc.ini (add this line -> extension=saprfc.so )
[[email protected] saprfc-1.4.1] # service httpd restart
Stopping httpd: [ OK ] Starting httpd: [ OK ] [[email protected] saprfc-1.4.1] # vi /var/www/html/test.php (add this line -> <?php phpinfo();?> )
从浏览器访问文件test.php,如果saprfc安装成功,在PHP info页面saprfc模块必须显示如下。 |
安装phpize—进行安装saprfc
phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块
如果要用phpize,可以自己在光盘或者yum 相对应php版本的php-devel包.
如:/usr/local/webserver/php/bin/phpize (find / -name phpize找到位置)