• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Missing symlink in Plesk setup for MariaDB by provider

themissingsymlink

New Pleskian
Hi,

Not sure where to post this.

My hosting provider uses Plesk to host my website. They provide a MariaDB database.
I am developing an alternative to PHP to use for my website, so using CGI scripting. The program I develop uses the dynamic library libmariadb.so.3 to run.
The provider has the setup that this library is present in /usr/lib64 and in /usr/lib64/libmariadbclient-plesk-3.0
But there is no symlink libmariadb.so that point to these libs.

Am I right in stating that this is a lack in their setup?

Putting a symlink inside my cgi-bin folder is not an option because that folder is not used when loading/running the cgi program.

I know I can rename my own libmariadb.so file on my local development VM and have the libmariadb.a linked in statically, but I think the dynamic solution should just work too.

Best regards,

Arnold
 
Last edited:
Instead of using the direct method using my program on the shebang line like this

#!/path/to/cgi-bin/cgiprog -c

Put the symlink myself into the cgi-bin folder. Used the bash shell as an intermediate.

#!/bin/bash
export LD_LIBRARY_PATH=/path/to/cgi-bin/
sed -n -e '5,$p' < "$0" | /path/to/cgi-bin/cgiprog -c "$0" "$@"
exit $?
THE SCRIPT FOLLOWS HERE FROM LINE 5 AND ON

(Source Multiline Shebang )

I still consider the setup incomplete.
 
This issue can be closed, as probably the provider had not updated ldconfig. So now the so is in the standard path.
Besides another solution had been to link with -Wl,-rpath,path/to/library
 
Back
Top