Closed vschardt closed 2 years ago
Are you sure the NW RFC SKD library files are in the PATH?
Yes, because I compile the module successfully. After that a php_sapnwrfc.dll was present. In the same console I tested it with the command
x64\ReleaseTS\php.exe -c x64\ReleaseTS\tmp-php.ini -m
Then I got the described warning. I replaced in the configured lib-folder (C:\nwrfcsdk) the SAP NW RFC SDK with a x86 version (I complied x64 TS). Then I got an error not a warning. So I think the libraries are found.
By the way in the tmp-php.ini I changed the entry for the extension to
extension=sapnwrfc;
instead of
extension=php_sapnwrfc.dll;
Otherwise PHP searches fo php_php_sapnwrfc.dll.dll.
Another thing is the compilation works only, when the SAP NW RFC SDK is placed in C:\nwrfcsdk or C:\nwrfcsdk_750. If I use another folder the check for the include-files fail. I think in the file config.w32 line 18 must be
PHP_SAPNWRFC + "\include" .
Try to find out with procmon
or similar what library PHP or the extension does not find.
The library MSVCP120.dll is missing. I think it's a library of VS 2013 runtime. I installed VS 2019 Community as you described. Did I make something wrong?
The SAP NW RFC SDK seems to require the Visual C++ 2013 redistributable to be installed.
I'll update the documentation accordingly.
I installed it. Then then module can be loaded.
Great, working after installing Visual C++ 2013
Bug Report
Summary
I downloaded the described sources written in 'Building from source', installed Visual Studio 2019 and was able to compile the module. The downloaded version of SAP NW RFC SDK 7.50 is 'WINDOWS ON X64 64BIT'
Current behavior
When I run php -m with the compiled php system I get the warning:
Warning: PHP Startup: Unable to load dynamic library 'sapnwrfc' (tried: C:\Users\v.schardt\source\repos\php\php-sdk\phpdev\vs16\x64\php-8.1.11-src\x64\Release_TS\sapnwrfc (Das angegebene Modul wurde nicht gefunden), C:\Users\v.schardt\source\repos\php\php-sdk\phpdev\vs16\x64\php-8.1.11-src\x64\Release_TS\php_sapnwrfc.dll (Das angegebene Modul wurde nicht gefunden)) in Unknown on line 0
I tried it with other SAP NW RFC SDKs (older ones or other versions). Then I get not only a warning but an error (as expected). So the compiled module starts, but couldn't find all necessary ressources. I can't identify which ressource is wrong or missing.
Also the precompiled module 'php_sapnwrfc-2.0.0-beta2-8.1.0-vs16-ts-x64.dll' doesn't work.
Can you help?