Only three things required for PHP and SAP integration.
Apache HTTP Server
PHP version 4 or 5
SAPRFC for PHP
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"
extension=php_saprfc.dll
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
require_once("saprfc.php");
or something like
// saprfc-class-library
require_once("saprfc/saprfc.php");