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...).


In reply to Re^2: real static perl by almut
in thread real static perl by bobb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.