1

So I have a library file that is used by a php module, both of which reside in my home dir on my shared hosted cpanel account.

Problem is this library depends on libcrypto.so.6 and libssl.so.6 files or symlinks by that name to whatever is the current version you have. (These particular versions do not exist on centos anymore)

Is there any way i get around this ? maybe change the referenced filenames in the library, or make a wrapper for the library ? or

2
  • Have you tried making the symlinks with appropriate names in a directory and pointing to that with the env. var. LD_LIBRARY_PATH ? – Anthon Dec 12 '14 at 8:55
  • thanks @Anthon, i was thinking about this as an option too, but i cannot create symlinks, but i could put actual library, say in the home dir, but how to make LD_LIBRARY_PATH look there when that library is loaded ? – Hayden Thring Dec 12 '14 at 9:24
0

You can put the libraries in ~/mylib and set LD_LIBRARY_PATH to search there:

export LD_LIBRARY_PATH=~/mylib

You can put that line in your ~/.bashrc if you want it to be available more permanently.

5
  • I understand what you are suggesting, but will ~/.bashrc be loaded in the context that i need it? As im not running a bash script; webpay_php.so is loaded as a php extension, which loads libwebpayclient.so ( via dlopen() ) which is linked to the missing libcrypto.so.6 and libssl.so.6 libs. – Hayden Thring Dec 12 '14 at 11:19
  • @HaydenThring Assuming your login shell is bash, it will be loaded and available for the next time you login. That is why you would put it there. – Anthon Dec 12 '14 at 12:05
  • but I am not logging in, it is the webserver that runs php while serving the webpage ? – Hayden Thring Dec 12 '14 at 23:13
  • If your webserver is running via systemd, then you can add ENVIRONMENT=LD_LIBRARY_PATH=/home/user/mylib to your service file which triggers your php instance. – Stewart Nov 19 '20 at 17:50
  • Whatever is loading webpay_php.so is being executed by something. It could be your desktop environment, systemd, bash. Just let us know what the parent process is of the process which loaded webpay_php.so. – Stewart Nov 19 '20 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.