cancel
Showing results for 
Search instead for 
Did you mean: 

saprfc extension not loaded

Former Member
0 Kudos

Hi PHP Fans,

I know this not really a SAP related question it's more Apache/PHP related but maybe somebody of you got simlar problems and was able to fix them.

I use Apache 2.0 on Win2k Professional and just got saprfc. After some problems with the extension and a PHP patch of php5ts.dll everything seemed to work fine when starting the Apache Webserver. But when I tried saprfc_test.php out of saprfc download it says saprfc extension is not loaded.

Is any PHP freak outside here in the forum who has an idea?

Regards

Heiko Küffen

  • SAP Managed Tags:

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you have the extension in the php.ini and you don't get an error when starting Apache then most likely the problem is that you have PHP5 and not PHP4. Common problem some it works with and some not.

former_member583013
Active Contributor
0 Kudos

Not all version from <b>SAPRFC</b> are compatible with all <b>PHP</b> version -:(

If you using for example <b>PHP 5.0.3</b>, try to get <b>SAPRFC 1.0.3</b>...It depends on the last number -;)

Greetings,

Blag.

Former Member
0 Kudos

Hi Craig,

maybe you are right, I think I have some mix out of PHP5 and PHP4, something from apachefriends.org which so far worked fine without any customizing.

Thanks so far, I will try out some other PHP versions and post my experiences. It may last some days.

Regards

Heiko

PS: The entry extension=php_saprfc.dll is done, when apache is starting there first was a problem that in php5ts.dll a function export was missing. I fixed the problem with a new dll and then on starting up everything was fine till the point I tried the test.

So my clonclusion was, the extension is loading but of what reason ever not really. So now I thing Craig is right with the version.

Former Member
0 Kudos

I updated yesterday to PHP5 and I have the same problem it just doesn't load. I'm going to take Alvaro's suggestion and maybe an older version of 5.

Former Member
0 Kudos

Hi Blag,

this was the solution, thank you very much!

What is to point out, which was not clear to me from other threads about the same problem?

The last three numbers of saprfc version must excactly match the PHP version.

So now the test runs well with PHP 4.1.1 and saprfc 1.4.1-4.4.1. I don't know the facts with Linux but with the windows binaries of saprfc this really seems to be a fact.

Greeting

Heiko

former_member583013
Active Contributor
0 Kudos

Hi Heiko:

I'm glad that you could fix it! -:D I had the problem so you know...trial and error -;)

Now that you got your system up and running i'm expecting to see a lot of posts of you -:D

Good luck!

Greetings,

Blag.

Former Member
0 Kudos

I'm having the same problem too, I read carefully this thread and double checked every point.

saprfc and php version match:

    saprfc-1.4-5.2.0.Win32.zip
    php-5.2.0-win32-installer.msi

verified also in phpinfo()

my php.ini has all the entries:

    php.ini
    ------------------------
    ...
    extension_dir = C:ProgrammiPHPext
    ...
    [SAPRFC]
    extension=php_saprfc.dll
    ...

and of course the php_saprfc.dll has been extraxted from the zip file in the C:\Programmi\PHP\ext

    Directory di C:ProgrammiPHPext

    26/01/2007  17.25    <DIR>          .
    26/01/2007  17.25    <DIR>          ..
    27/05/2004  11.28         4.972.544 librfc32.dll
    02/11/2006  12.41           127.034 php_ldap.dll
    02/11/2006  12.41            49.211 php_mysql.dll
    02/11/2006  12.41            90.172 php_mysqli.dll
    19/11/2006  08.59            73.728 php_saprfc.dll
               5 File      5.312.689 byte
               2 Directory   1.352.798.208 byte disponibili

librfc32.dll is also in the c:\windows\system32

Apache ha been restarted after the modifications but still the dll isn't loaded, I still get the message "SAPRFC extension not loaded".

what I'm missing?

Former Member
0 Kudos

try C:\Programmi\PHP\ext in php.ini

Former Member
0 Kudos

nope.

I already tried this as well as all possible different paths combinations like C:\PROGRA~1\PHP\EXT or variations thereof without any luck.

Former Member
0 Kudos

did you try it from the command line to exclude Apache configuration errors?

change to the directory containing the test script.

if >php -version< yields a valid result try >php saprfc_test.php<

otherwise try /full/path/to/php/directory/php.exe saprfc_test.php

if this works, your apache might have a path problem, resulting in usage of a wrong php.ini (the one in your php folder for example). AFAIK this can be set via environment variable PHPRC(google for its usage)

myabe this helps,

anton

Former Member
0 Kudos

I didn't try from the CLI, but since phpinfo() works and shows the correct path, I excluded Apache problems. By the way your suggestion confirms that somehow the dll is seen but not loaded.

PHPRC variable was already correctly set to:


C:ProgrammiPHP

Here is the extension_dir path from phpinfo()


extension_dir	C:ProgrammiPHPext	C:ProgrammiPHPext

(Removing the trailing slash doesn't cure the problem)

Here are the ouput of both commands:


D:nbesitisaprfc>php -version
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:ProgrammiPHPext
php_saprfc.dll' - Impossibile avviare l'applicazione specificata. La configurazi
one dell'applicazione non Þ corretta. Una nuova installazione dell'applicazione
potrebbe risolvere il problema.
 in Unknown on line 0
PHP 5.2.0 (cli) (built: Nov  2 2006 11:57:36)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

-

-



D:nbesitisaprfc>c:programmiPHPphp.exe saprfc_test.php
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:ProgrammiPHPext
php_saprfc.dll' - Impossibile avviare l'applicazione specificata. La configurazi
one dell'applicazione non Þ corretta. Una nuova installazione dell'applicazione
potrebbe risolvere il problema.
 in Unknown on line 0
...

I tried as suggetsed a new installation from scratch of both php and saprfc but nothing changes.

Former Member
0 Kudos

I tried with Dependency walker and it seems as some dll are missing, namely:


MSVCR80.DLL
DRVADODB.DLL
DWMAPI.DLL

I'm looking for these libraries and only found the MSVCR80.DLL so far ...

former_member583013
Active Contributor
0 Kudos

This may sound silly...But it worked for me -:)

Copy the <b>php_saprfc.dll</b> to your root directory...

<b>C:\Programming\PHP5</b>

and also, copy it to the ext folder

<b>C:\Programming\PHP5\ext</b>

Greetings,

Blag.

Former Member
0 Kudos

Hi Flavio,

have you solved this issue, since we're having the same?

Answers (2)

Answers (2)

Former Member
0 Kudos

My god.

I have solved this issue.

[Microsoft Visual C++ 2008 Redistributable Package (x86)|http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en] is required for saprfc-1.4.1 php_saprfc_528.dll

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

Does your php.ini file have this line:

extension=php_saprfc.dll

Cheers

JohnA