Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Installing a new Perl on 1and1

by rpnoble419 (Pilgrim)
on Oct 15, 2012 at 05:09 UTC ( [id://999008]=perlquestion: print w/replies, xml ) Need Help??

rpnoble419 has asked for the wisdom of the Perl Monks concerning the following question:

After several weeks of effort I could not get perlbrew to install on my 1and1 server. I did get the generic ActiveState 5.14 to install, However I don't see a perl file in the bin directory. I have a symbolic link called perl5.14.2. I don't have much experience with linux, but I believe that this symbolic link calls the perl-static application. And I can run perl-static -v and get the correct Perl information screen, so I know Perl 5.14.2 is installed and running. I have updated the .bash_profile to add the ~/Perl-5.14/bin to the path and now I can run my scripts from the command line using either perl5.14.2 <name of script> or perl-static <name of scriipt>. I have also added the ~/Perl5-14/lib directory as my PERL5LIB path.

When I try to run the scripts via Apache I'm still getting the default Perl interpreter running. I have changed the #! to reflect the Perl 5.14 path:

#!/kunden/homepages/XX/XXXXXXXX/htdocs/Perl-5.14/bin/perl5.14.2

I have also tried the following:

#!~/Perl-5.14/bin/perl5.14.2 and #!~/Perl-5.14/bin/perl-static and #!/kunden/homepages/XX/XXXXXXXX/htdocs/Perl-5.14/bin/perl-static

I'm left to ponder my life here. I hate running on a shared box. What am I missing? Do I need to point Apache to Perl5.14? I thought by changing the shebang it should work. Should I re-install ActiveState into a directory? Do I need to change anything else in the .bash_profile to force any reference to perl to be redirected to my Perl-5.14?

As always thanks for the help

Replies are listed 'Best First'.
Re: Installing a new Perl on 1and1
by thomas895 (Deacon) on Oct 15, 2012 at 05:19 UTC

    If I may ask -- what do you need Perl 5.14 for that the default Perl does not provide?

    I do not know what the issue could be on 1and1. They might have specified an option somewhere that forces all scripts to run with their interpreter.
    Perhaps, though, what you could do is cross-compile Perl on your own computer, for the 1and1 server. Find out the arch of the server, and then specify that when you run the configure script in the Perl dist. Of course, this is assuming that the server you SSH into is indeed the same as the one that executes the Perl script. On some hosts, this is not so, and your scripts will refuse to execute, leaving an error message in the logs about "cannot execute perl".
    Usually, if you need more advanced choices, then shared hosting is not the best decision. Perhaps a VPS will work better in your case.

    Good luck!

    ~Thomas~
    confess( "I offer no guarantees on my code." );
Re: Installing a new Perl on 1and1
by flexvault (Monsignor) on Oct 15, 2012 at 14:45 UTC

    rpnoble419,

    Well, it sounds like you are trying to overcome some obstacles that 1and1 has put in place to prevent you from "killing" their server. Maybe a call to support would give you some "do and don't"s.

    My advice is to eliminate your dependence on 'PATH' and use the fully qualified name for the Perl you want to use. For example:

    1and1:> /kunden/homepages/XX/XXXXXXXX/htdocs/Perl-5.14/bin/perl5.14.2 +script.plx
    should alway execute 'script.plx' if its in the current directory, but would be a pain to type each time, so what you need to find is the exact path (echo $PATH) to your home 'bin' and enter that in the following:
    1and1:> ln -s /kunden/homepages/XX/XXXXXXXX/htdocs/Perl-5.14/bin/perl5 +.14.2 [path]/myperl
    Now whenever you type 'myperl' you will get the '/kunden/homepages/XX/XXXXXXXX/htdocs/Perl-5.14/bin/perl5.14.2'. Make sure 'myperl' isn't already defined by doing a 'which myperl' and if it's defined, then pick a different name. I use 'pyrperl' which is rarely ever used.

    If this doesn't work, you'll need to provide more information. While this is more of a Linux question, I'm glad you're using Perl and I think it is definitely Perl related.

    Good Luck!

    "Well done is better than well said." - Benjamin Franklin

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://999008]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found