Register Login

PHP and SAP integration Requirments

Only three things required for PHP and SAP integration.

Apache HTTP Server
PHP version 4 or 5
Setting PHPRC Variabl

DocumentRoot "T:/websites"
SetEnv PHPRC T:/apache/php

Set my script alias so Apache knows what a .php file is

ScriptAlias /php/ "T:/apache/php/"

Then of course to distinguish what a php script is I had to

AddType application/x-httpd-php .php .phtml

And of course the action for the type

Action application/x-httpd-php "/php/php-cgi.exe"

So with my Apache configuration all taken care of I jumped over to my PHP config. That's the php.ini file located inder Apache/php. I didn't do much at all to this file other than ensure that the extension directory was pointing to the right location and that the module for the SAPRFC was in place.

; Directory in which the loadable extensions (modules) reside.
extension_dir = "t:/apache/php/extensions"


Then I also copied the php_saprfc.dll to the extension directory from where I unpacked my SAPRFC download.

So the example there is the standard one from SAPRFC, example_userlist.php, and so in order to use this you will need a few pieces from SAPRFC. OK, you really only need to ensure that the saprfc.php file is located. This file is the main class file containing all the little bits and pieces you need to connect.

// saprfc-class-library

or something like
// saprfc-class-library


  • 24 Jul 2014 8:41 am

    hello Shalesh Singh Visen,

    i tryed but unable to connect cany u provide me with more details....