douou9094747 2014-07-18 07:09
浏览 110

将PHP与SAP数据库连接

So, I already followed all the steps below for saprfc windows installation.

1) Extract zip file saprfc-$VERSION$-$PHP_VERSION$.zip
2) Copy php-saprfc.dll to your extensions directory (e.g. C:\PHP\extensions)
3) Edit php.ini file (in windows system dircetory, e.g. C:\WINNT, C:\WINDOWS)
         and add line: 'extension=php_saprfc.dll'
4) Copy librfc32.dll (from SAPGUI install CD) to the windows system
         directory or simple install SAPGUI on your machine.

Another source said we will we need SAP SDK. Is it really needed for Windows? Also, will it be possible to code PHP connect to SAP in a computer that doesn't have SAP program? Or we only can do those installations in computer that has SAP application?

Then after the installation, what do I have to do next? I am trying to do steps below, yet still confused....

  1) Extract php sources to C:\PHP-x.y.z
  2) Extract php win support files to C:\PHP-x.y.z\win32
  3) Install RFCSDK to C:\PHP-x.y.zfcsdk
  4) Copy SAPRFC sources to C:\PHP-x.y.z\ext\saprfc
  5) Copy php4ts.lib or php5ts.lib (from PHP binaries) to C:\PHP-x.y.z\win32
  6) For PHP5 copy saprfc.dsp5 to saprfc.dsp
  6) Open project C:\PHP-x.y.z\ext\saprfc\saprfc.dsp in Microsoft Visual C++ 6.0
  7) Under Tools|Option|Directory set path for Include files and for Library files
     (C:\PHP-x.y.z\win32\include; C:\PHP-x.y.zfcsdk\include;
      C:\PHP-x.y.z\win32\lib; C:\PHP-x.y.zfcsdk\lib)
  8) Set active configuration to "saprfc - Windows_TS" (under Build menu)
  9) Build php_saprfc.dll.
  10) Compiled DLL you find in C:\PHP-x.y.z\Release_TS directory

Where to get PHP sources, PHP win support, and how to compile the program?

Sorry, I am totally new to this. Looking for the answers. Thank you very much!

  • 写回答

1条回答 默认 最新

  • 普通网友 2015-02-05 09:49
    关注

    Building "windows extensions" is explained in general here: https://wiki.php.net/internals/windows/stepbystepbuild

    There is also explained which version of VS you need for which PHP version.

    I also tried to build the sapnwrfc extension for PHP 5.5 on windows, but failed at some part...my progress/documentation is here: https://github.com/piersharding/php-sapnwrfc/issues/6

    Maybe you can progress further :-)

    评论

报告相同问题?

悬赏问题

  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启