Hi

I have installed perl 5.20.3 using perlbrew on a Centos 7 machine. The new version of Perl sits in a user account at /home/grunt103/perl5/perlbrew/perls/perl-5.20.3/bin/perl

I can run a hello world script in the Apache cgi-bin (./var/www/cgi-bin/hello_brew.pl) from the command line without any issues. The version command $^X in the script shows it is using perl 5.20.3

I can also run a hello world script from the command line using the default instal at /usr/bin/perl

However if I try to run the scripts through the browser (271.0.0.1/cgi-bin/) the script using the default instal works fine, but the script using the 5.20.3 instal gives a server 500 error and the following entries in the apache error log;

[error] [client 127.0.0.1] (13) Permission denied: exec of '/var/www/c +gi-bin/perl_brew.pl' failed [error] [client 127.0.0.1] Premature end of script headers:

I get the same result for both root user and the grunt103 user.

I have tried issuing the command 'perlbrew use perl-5.20.3' before running the script but to no avail.

I have disabled selinux but this has made no difference.

I have tried a variety of permissions, owners, groups, setuid and setgid settings but none have worked.

Can any body advise on how I might gain access to the new perl version via localhost?

Thanks


In reply to localhost cannot access new perl version by OpenSpace

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.