Solved

libraries not found by web server on UNIX

Posted on 1998-01-12
3
132 Views
Last Modified: 2013-12-25
I have a C++ CGI that I want to test on Netscape Enterprise 3.0 on a Solaris box.  When I compile my code without linking it with my libraries, it executes just fine through my Web server; however, when I link my code with my libraries, I get an error from the Web server saying that my libraries could not be found.

I have set LD_LIBRARY_PATH but it does not make any difference.  I have also tried to set that library path through the web server, but cannot find any successful way to do so.

Any ideas?
0
Comment
Question by:Kryus
3 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1831821
How is it that you can run your program at all without linking it with your libraries?  Perhaps if you provided additional detail in your question it would help shed some light on it.
0
 

Author Comment

by:Kryus
ID: 1831822
JHance:

a) My CGI is a simple program that sends "Hello World!" back to the browser.  True, I do NOT NEED to link with libraries to make that part work.

b) The reason why I am linking with my libraries is to see how I tell my web server where to find my libraries when I make further modifications to my program.
0
 

Accepted Solution

by:
jloomis earned 50 total points
ID: 1831823
The reason your shared libraries can't be found is that the Netscape server doesn't pass through environment variables to the CGI.  Here are two ways around it:

1) You can get the server to set environment variables for you by adding a line like this to your obj.conf:

Init fn=init-cgi LD_LIBRARY_PATH=/usr/lib:/usr/local/lib

For more information on this Init function, look in the "NSAPI Programmers Guide" at http://developer.netscape.com.

2) You can make a stub program that sets the environment variable using putenv and then call exec or system to run the real CGI program.  This involves one or more additional process invocations, but will work on any web server.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
inactive users 13 70
Disk Ram Peak 1 33
Recursively Delete Files 5 68
Need some help with powershell script 5 36
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now