Skip to content
Advertisement

PHP popen Application cannot open shared object

I’ve created a simple C++ Application with the boost framework. The Application is running correct from the command line.

After this I’ve created a PHP file with a popen to this binary.

JavaScript

After visiting the website I’ve got the following error message from apache2/error_log

JavaScript

System is openSuse Linux.

Steps done:

  • Insert lib path to /etc/ld.so.conf and running ldconfig

Advertisement

Answer

You need to make sure you have LD_LIBRARY_PATH set for user running your web server includes the location of the shared library you’ve built.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement