in reply to Re: real static perl
in thread real static perl
If all you have is FTP access, you probably won't be able to do things like make the file (perl executable) executable as far a linux goes.
Strictly speaking, on Linux, an executable doesn't need to be executable :) You can always run it directly via the dynamic loader. If you don't believe it, try the following:
Copy the perl binary to some temp directory
$ cp `which perl` /tmp
Remove the executable bit
$ chmod -x /tmp/perl $ ls -l /tmp/perl -rw-r--r-- 1 ab ab 1061700 Apr 20 00:47 /tmp/perl
Now, if you try to run it normally, you'd of course get
$ /tmp/perl -v bash: /tmp/perl: Permission denied
but if you use the dynamic loader, it works without a hitch
$ /lib/ld-linux.so.2 /tmp/perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi (...)
Also depending on the setup, you could potentially not have access to your rc files (bashrc, cshrc, bash_profile) and would thus be unable to set environment variables needed
You don't necessarily need to. If you have mod_env available, you can conveniently set them from your apache config (e.g. for the CGI directory in question):
SetEnv LD_LIBRARY_PATH /path/to/private/shared/libs
This even works with .htaccess files, so you don't need write access to the main httpd.conf. Also, as I tried to point out, it's probably not even a good idea to set LD_LIBRARY_PATH system-wide from some rc file (too many side effects if you mess with important libs on that scale...).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: real static perl
by marc_ (Deacon) on Apr 20, 2007 at 16:59 UTC |