on 11-22-2006 9:35 AM
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....
Here is good guide for the same. I faced similar problems, but it just solved with ease,
http://www.tanguay.info/wamp/installPhp5.php5
Regards
Kathirvel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please run simple script <? phpinfo() ?> and check output if your php.ini
file is in the path expected by APACHE/PHP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I have librfc32.dll and librfc32u.dll in windows, but still getting the error.
I have run the code for phpinfo()
<b>Configuration File (php.ini) Path C:\WINDOWS\php.ini</b>
The PATH variable in Apache Environment Table is
<b>C:\Development\Apache2\PHP\;c:\sapdb\programs\bin;c:\sapdb\programs\pgm;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\Infoprint Select;C:\Notes;C:\Program Files\XLView;C:\lotus\compnent;C:\Utilities;C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facility\;C:\IBMTOOLS\Python22;C:\WINDOWS\Downloaded Program Files;C:\j2sdk1.4.2_08\bin;C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\WINDOWS\system32;</b>
I have php.ini in windows folder there is no php.ini in Apache2\PHP folder.
I am accessing DBon different server.
I think i will test it first installing DB on my local host .
Will anybody suggest me what package i should download from service market place for installing it on my Local PC?
Hi
Thanx for reply.I already put php_saprfc.dll in <b>C:\Development\Apache2\ext</b>
But it is not working properly.Giving the same error.
I have earlier downloaded <b>RFCSDK_Z.exe</b> from service market place from which i got <b>librfc32.dll</b>.It is already present in window\system32 directory.
i have also put <b>librfc32.dll</b> in extension directory of php and restarted the apache server..
I am getting the same error.
<b>saprfc::callFunction()
SAPRFC-Extension.dll not loaded</b>.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's strange. I tried the program you posted by myself and did not get any error. Then I removed the librfc32.dll (and the librfc32u.dll, which is the unicode variant) from system32. After restarting Apache I got exactly the error message you described - when I moved the files back, it did work again. So I'd bet the librfc can't be found.
I suggest you try again if this might be the case.
:Frederic:
You also need the librfc32.dll file.
For download instructions see here: <a href="https://websmp107.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000463622&">SAP Service Marketplace</a>.
More specifically, go to <a href="http://service.sap.com/swdc">http://service.sap.com/swdc</a>, navigate on the lefthand menu to
-> Download
-> SAP Support Packages and Patches
-> Entry by Application Group
Then on the righthand main screen to your relevant version, e.g.
SAP NetWeaver
-> SAP NETWEAVER
-> SAP NetWeaver components ( < SAP NW 04 )
-> SAP WEB AS
-> SAP WEB AS 6.40
-> SAP KERNEL 6.40 <32/64-BIT /UNICODE>
-> <your OS + platform>
-> #Database independent
The file librfc_XX-yyyyyyyy.SAR contains the RFC-library. You can directly click on it to download the file.
You also need the SAPCAR extracting program. This you can find under http://service.sap.com/patches -> Support Packages and Patches -> Entry by Application Group -> Additional Components -> SAPCAR
Download it and put both files in a directory. Then open a dos prompt (cmd.exe from Start/run), navigate to this directory and extract it using the -xvf options, e.g.
SAPCAR_0-10003694.exe -xvf librfc_22-20000961.SAR
Then move this dll to your Windows\system32 folder and restart Apache.
I hope this helps.
:Frederic:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you put php_saprfc.dll in "C:\Development\Apache2\PHP\ext"
Also, I hope you have SAPGUI installed!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.