Subject | Re: [firebird-support] Install of UDF dll |
---|---|
Author | Helen Borrie |
Post date | 2004-08-29T05:01:40Z |
At 11:22 PM 28/08/2004 -0400, Don Gollahon wrote:
configure the server". There are three levels of security for the location
of external libraries, of which the most risky is FULL. It allows the
server to access an extlib anywhere in the physical filesystem and requires
that the database declaration include the full path to the dir containing
the dll (or so, in the case of posix). The most restrictive is NONE, which
doesn't allow use of external libs at all.
The medium is RESTRICT, which requires the paths to each dir where extlibs
can be accessed. If the location is within the Firebird "tree", the paths
can be relative. And so it is with the default: in firebird.conf you will
see that the parameter for UDFAccess is RESTRICT and the path is UDF, i.e.
it is the ../UDF dir, relative to the root. It is the RESTRICT setting
that enables you to declare the module_name without path or extension.
You can uncomment the default setting and append other paths and/or remove
the default path. So, to make the server look in a location c:\MyUDFLibs
in case it doesn't find the module_name in $RootDirectory\UDF, do this:
UDFAccess = RESTRICT UDF;c:\MyUDFs
variables in your installer and update firebird.conf via a filesystem
method to append the alternative path.
only hard-code your user's custom settings
path. That would be asking for trouble.
You can optionally install the FIREBIRD environment variable, which is a
string consisting of the hard path to the directory where firebird.conf is,
that has \bin, \UDF, etc. etc. beneath it. But, on the Windows standard
install, you don't need it, as the path is installed in the registry when
the script runs instreg.exe. Instreg is clever enough to know that, if
it's being run from the ..\bin dir (as it must be) then its parent is the
root path, whatever it's called. That's why, with the standard installer,
if you set a different installation path, instreg will still get the
registry entry right.
IMO, if you write an installer that lets your users bung UDFs in any old
place, you're not doing them or yourself any favours.
./heLen
>I have read many articles on UDFs in this group but none seem to deal withPerhaps because it's not a question of "how to install the dll" but "how to
>how to install the dll.
configure the server". There are three levels of security for the location
of external libraries, of which the most risky is FULL. It allows the
server to access an extlib anywhere in the physical filesystem and requires
that the database declaration include the full path to the dir containing
the dll (or so, in the case of posix). The most restrictive is NONE, which
doesn't allow use of external libs at all.
The medium is RESTRICT, which requires the paths to each dir where extlibs
can be accessed. If the location is within the Firebird "tree", the paths
can be relative. And so it is with the default: in firebird.conf you will
see that the parameter for UDFAccess is RESTRICT and the path is UDF, i.e.
it is the ../UDF dir, relative to the root. It is the RESTRICT setting
that enables you to declare the module_name without path or extension.
You can uncomment the default setting and append other paths and/or remove
the default path. So, to make the server look in a location c:\MyUDFLibs
in case it doesn't find the module_name in $RootDirectory\UDF, do this:
UDFAccess = RESTRICT UDF;c:\MyUDFs
>I need to install a UDF dll with my app install. IFrom the server, you don't (can't). You're going to have to hold these
>don't want the user to have to copy a dll to the right place. I will make a
>separate install for the server and the client. But how do I get the path
>to the FB area on the server that the user used?
variables in your installer and update firebird.conf via a filesystem
method to append the alternative path.
>Granted, they will mostNot a problem. Keep the UDF dir setting as a relative path setting and
>likely use the defaults but as soon as I say that, someone won't. And what
>if in the future the directory name for FB changes like it has a few times
>in the past?
only hard-code your user's custom settings
> I thought the FB install created a Firebird environment variable toNo, there has never been an environment variable to designate the extlib
> designate this path but I don't see one in my installs.
path. That would be asking for trouble.
You can optionally install the FIREBIRD environment variable, which is a
string consisting of the hard path to the directory where firebird.conf is,
that has \bin, \UDF, etc. etc. beneath it. But, on the Windows standard
install, you don't need it, as the path is installed in the registry when
the script runs instreg.exe. Instreg is clever enough to know that, if
it's being run from the ..\bin dir (as it must be) then its parent is the
root path, whatever it's called. That's why, with the standard installer,
if you set a different installation path, instreg will still get the
registry entry right.
IMO, if you write an installer that lets your users bung UDFs in any old
place, you're not doing them or yourself any favours.
./heLen