"Mahdi A. Sbeih" wrote: > I have a static Perl+DBI+DBD::Informix Compiled statically > on a Solaris 2.6 machine with Informix 7.x server.
Why? Of all the platforms I can think of, this is the one you won't need to use static linking. > DBD::Informix was compiled statically; and I used > the DBD_INFORMIX_RELOCATABLE_INFORMIXDIR also. Fundamental confusion. DBD_INFORMIX_RELOCATABLE_INFORMIXDIR only applies to shared library linking; it is related to how the Informix shared libraries are linked in. If you do static linking, then the Informix static libraries are linked permanently into your Perl executable. If you do dynamic linking but don't set that environment variable, then DBD::Informix ensures that the Informix libraries are specified by absolute pathname, which means that root-owned processes can access them. If you do dynamic linking and do set the environment variable, then you may have problems with root running Perl and trying to use DBD::Informix, but you can also relocate the shared libraries and specify the new location via LD_LIBRARY_PATH. > So when I want to run Perl scripts I need to set > the environment variable LD_LIBRARY_PATH to point > to the Informix shared libraries, which is working > find with us. > > The problem here is that the sys admin is running > a Perl script from a an apache web server, and this > Perl script is running as user 'nobody'!! Running as 'nobody' isn't the problem; not having the environment set correctly is the problem. Lookup SetEnv and PassEnv directives for Apache. > So this user has no shell and no environment settings > so Perl will not work since it is looking for LD_LIBRARY_PATH?? The problem is not that it is looking for LD_LIBRARY_PATH. It is looking for $INFORMIXDIR and $INFORMIXSERVER (and, most likely, the ones in use when DBD::Informix are not the ones in use in the production environment). You may be able to fix things by modifying Informix.pm so that the correct default INFORMIXDIR and INFORMIXSERVER values are set. Much better is to ensure that Apache sets the correct values. If you really have a statically linked Perl, there is no way that LD_LIBRARY_PATH can affect things. > Anybody has an idea about this case?? > __________________________ > Mahdi A. Sbeih > IDS Software Systems > Software Engineer > Tel: 650-349-0500, ext 134 > [EMAIL PROTECTED] > __________________________ -- Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) Guardian of DBD::Informix 1.00.PC2 -- see http://dbi.perl.org/ #include <disclaimer.h>
