1

大家好,正如我的标题所说的“我对 congurar SAPRFC 有问题”使用 Linux Mint Petra + PHP5。保留本手册,但在运行“make”和“make install”时会出现我:

    /bin/bash /usr/src/saprfc-1.4.1/libtool --mode=compile cc  -I. -I/usr/src/saprfc-1.4.1 -DPHP_ATOM_INC -I/usr/src/saprfc-1.4.1/include -I/usr/src/saprfc-1.4.1/main -I/usr/src/saprfc-1.4.1 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/opt/SAP/rfcsdk//include  -DHAVE_CONFIG_H  -g -O2   -c /usr/src/saprfc-1.4.1/saprfc.c -o saprfc.lo 
libtool: compile:  cc -I. -I/usr/src/saprfc-1.4.1 -DPHP_ATOM_INC -I/usr/src/saprfc-1.4.1/include -I/usr/src/saprfc-1.4.1/main -I/usr/src/saprfc-1.4.1 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/opt/SAP/rfcsdk//include -DHAVE_CONFIG_H -g -O2 -c /usr/src/saprfc-1.4.1/saprfc.c  -fPIC -DPIC -o .libs/saprfc.o
In file included from /usr/src/saprfc-1.4.1/php_saprfc.h:23:0,
                 from /usr/src/saprfc-1.4.1/saprfc.c:27:
/usr/src/saprfc-1.4.1/rfccal.h:44:19: fatal error: rfcsi.h: No such file or directory
 #include "rfcsi.h"
                   ^
compilation terminated.
make: *** [saprfc.lo] Error 1
4

2 回答 2

1

尽管这是一个老问题,但我最近在带有 PHP 5.5.9 的 Ubuntu 14.04 机器上安装了 SAPRFC。由于我在途中发现了一些问题,我想分享一下经验。

要求:RFCSDK 6.40 Non-Unicode 64bits(必须从 SAP Service Marketplace 下载)。

1.- 在“/usr/sap/rfcsdk”中提取RFCSDK

2.- 在某处解压缩“saprfc”(http://saprfc.sourceforge.net/),即“/root/saprfc”

3.- 安装依赖

apt-get install libstdc++5

4.- 编辑文件“saprfc.c”第 47 行,(见这里

change "function_entry" to "zend_function_entry"

5.- 现在,我们可以编译

phpize
./configure
make
make install

如果没有错误,我们将在saprfc.so文件夹中保存编译文件/usr/lib/php5/20121212。现在我们必须告诉 PHP 在启动时加载库。

cd /etc/php5/mods-available
echo "extension=saprfc.so" > saprfc.ini
ln -s saprfc.ini ../apache2/conf.d/25-saprfc.ini

重新启动apache,看看它是否工作:

service apache2 restart

使用phpinfo();我们可以看到工作: 在此处输入图像描述

于 2015-03-06T12:07:14.817 回答
-1

在 /usr/local/ 中上传 rfcsdk 7.20

在 /usr/local/rfcsdk/lib 中上传 librfccm.so 补丁

在我的根目录中提取 saprfc-1.4.1

下载 rfcsi.h ( http://www.filewatcher.com/m/rfcsi.h.9944-0.html ) 并上传到 saprfc-1.4.1

编辑文件 saprfc-1.4.1/saprfc.c (在第 47 行将 function_entry 更改为 zend_function_entry )

在 saprfc-1.4.1 中执行以下命令

   phpize
   ./configure
   make
   make install
于 2015-08-06T09:47:45.640 回答