Skip to Content
0
Former Member
Nov 22, 2006 at 09:35 AM

Problem with apache2.0.59 and saprfc1.4-5.2.0.

118 Views

Hello

I am trying to connect to R/3 using PHP,Apache.but unable to load SAPRFC module.

I am using these files.

<b>apache_2.0.59-win32-x86-no_ssl.msi

php-5.2.0-win32-installer.msi

php-5.2.0-Win32.zip

saprfc-1.4-5.2.0.Win32.zip

</b>

My apache is in

C:\Development\Apache2

i have installed PHP and its windows binaries in

C:\Development\Apache2\PHP

php.ini is in windows folder.

i have unzip saprfc in

C:\Development\Apache2\htdocs

currently php is working with apache.

i have done changes in httpd.conf

ServerRoot "C:/Development/Apache2"

LoadModule php5_module "C:\Development\Apache2\PHP\php5apache2.dll"

DocumentRoot "C:/Development/htdocs"

ScriptAlias /cgi-bin/ "C:/Development/Apache2/cgi-bin/"

ScriptAlias /PHP/ " C:/Development/Apache2/PHP/"

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

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

This are set as Env variables.

SetEnv PHPRC "C:/Development/Apache2/PHP"

PHPIniDir "C:/Development/Apache2/PHP"

This is my php.ini

; Windows: "\path1;\path2"

;include_path = ".;c:\php\includes;c:\Development\Apache2\PHP\PEAR;c:\Development\Apache2\includes;"

extension_dir = "./;c:\Development\Apache2\PHP\ext"

extension=php_mbstring.dll

extension=php_gd2.dll

extension=php_mysql.dll

extension=php_saprfc.dll

extension=php_soap.dll

I have written this code....

...

require_once("saprfc.php");

// Create saprfc-instance

$sap = new saprfc(array(

"logindata"=>array(

"ASHOST"=>"9.182.47.250" // application server

,"SYSNR"=>"10" // system number

,"CLIENT"=>"400" // client

,"USER"=>"test" // user

,"PASSWD"=>"test1" // password

)

,"show_errors"=>false // let class printout errors

,"debug"=>false)) ; // detailed debugging information

echo $sap->getStatusTextLong();

At this point it is printing....

<b>No errors detected.</b>

//Z_FUNCTION_MODULE which returns only one varible of type char10 and no input variables.

$result=$sap->callFunction("Z_FUNCTION_MODULE",

array( array("EXPORT","",""),array("IMPORT","NAME")));

echo $sap->getStatusTextLong();

I am getting the error .

<b>saprfc::callFunction()

SAPRFC-Extension.dll not loaded.</b>

Please help....