Closed luckyduck closed 5 years ago
This sounds interesting. Personally I never had any problems using PHP-FPM, but I have never tried with Apache mod-php... I'll try to investigate.
What is your PHP version?
Just a quick thought: are the files in /usr/sap/nwrfcsck
readable by the user Apache and/or mod_php or PHP-FPM are running?
Also, try to use SAP NW RFC SDK 7.20 instead of 7.50. There might be unsolved problems with the new SDK, as I have not tested the extension using the new SDK yet.
Awesome. It was about access rights. Didn't thought about it in regard to the libraries. Thank you so much!
Thanks for all the effort you put into this. Really appreciated. I ran into a problem, though. I hope you can help with this.
CLI is working fine
FPM / MOD_PHP causing problems
I am trying to enable this extension for mod_php and/or php-fpm. This leads to an error in the PHP log:
Setup seems to be correct
However, I have added the library path to ld.so.conf.d..:
$ cat /etc/ld.so.conf.d/nwrfcsdk.conf /usr/sap/nwrfcsdk/lib
... and executed ldconfig.
Libraries are loading fine, actually
The libraries even show up in the debug output of ldconfig:
$ ldconfig -p|grep nwrfcsdk libsapucum.so (libc6,x86-64) => /usr/sap/nwrfcsdk/lib/libsapucum.so libsapnwrfc.so (libc6,x86-64) => /usr/sap/nwrfcsdk/lib/libsapnwrfc.so libicuuc.so.50 (libc6,x86-64) => /usr/sap/nwrfcsdk/lib/libicuuc.so.50 libicui18n.so.50 (libc6,x86-64) => /usr/sap/nwrfcsdk/lib/libicui18n.so.50 libicudecnumber.so (libc6,x86-64) => /usr/sap/nwrfcsdk/lib/libicudecnumber.so libicudata.so.50 (libc6,x86-64) => /usr/sap/nwrfcsdk/lib/libicudata.so.50
Extension is linked
$ ldd /usr/lib/php/20151012/sapnwrfc.so linux-vdso.so.1 => (0x00007ffc0c9d2000) libsapucum.so => /usr/sap/nwrfcsdk/lib/libsapucum.so (0x00007f8a6ca1e000) libsapnwrfc.so => /usr/sap/nwrfcsdk/lib/libsapnwrfc.so (0x00007f8a6bed4000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8a6bb0a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8a6b906000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8a6b6fe000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8a6b37c000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8a6b073000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8a6ae5d000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8a6ac40000) libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f8a6aa3b000) /lib64/ld-linux-x86-64.so.2 (0x00007f8a6cf67000)
Shouldn't this be enough?
My testscript:
SetEnv doesn't help
I tried to pass along LD_LIBRARY_PATH to apache in the VHost configuration. That had no effect whatsoever:
SetEnv LD_LIBRARY_PATH /usr/sap/nwrfcsdk/lib