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

On the old lsr server i used:

<perl> use lib '/home/lsrfm/perllib'; use lib '/home/lsrfm/webs/qwer.lsrfm.com/perllib'; use LSRfm::Application::CMS; </perl> PerlInitHandler Apache::Reload PerlSetVar ReloadAll Off DirectoryIndex index.cgiapp <Files index.cgiapp> SetHandler perl-script PerlHandler LSRfm::Application::CMS->handler </Files>

Our new server (which i didnt choose) denies the use of perl tags in htaccess due to 'secruity'

What do i do instead as without the use line i just get a white page instead of a website

Update

Now using:, im just getting a white page...... which isnt right i should get the apache::status output.... should i not?

PerlInitHandler Apache2::Reload PerlSetVar ReloadAll Off ErrorDocument 400 /error/index.php ErrorDocument 401 /error/index.php ErrorDocument 403 /error/index.php ErrorDocument 404 /error/index.php ErrorDocument 500 /error/index.php Options +Indexes DirectoryIndex index.cgiapp <Files index.cgiapp> SetHandler perl-script PerlHandler Apache::Status </Files>

Update

Turns out the server does not have apache::reload installed (nor apache::Status for that matter) due to 'security'

Barry Carlyon barry@barrycarlyon.co.uk

Replies are listed 'Best First'.
Re: perl website - htaccess
by tinita (Parson) on Sep 03, 2007 at 18:14 UTC

    try setting PERL5LIB via PerlSetEnv

    update:
    PerlSetEnv PERL5LIB /home/lsrfm/perllib:/home/lsrfm/webs/qwer.lsrfm.com/perllib

Re: perl website - htaccess
by atemon (Chaplain) on Sep 03, 2007 at 18:02 UTC

    Hi,

    Please create a file named startup.pl (any other name will do, but this is the convention) and add your "use" lines inside it ( within a BEGIN block if you want to add more code) Then add the apache directive

    PerlRequire "/<your directory path>/startup.pl"
    and restart the server.

    update:
    Your startup.pl should look like

    #!/usr/bin/perl BEGIN{ use lib '/home/lsrfm/perllib'; use lib '/home/lsrfm/webs/qwer.lsrfm.com/perllib'; use LSRfm::Application::CMS; } 1; # return true as usual :)

    Cheers !

    --VC



    There are three sides to any argument.....
    your side, my side and the right side.

      Its not my server and i dont have that kinda access

      can i out perl require in .htaccess?

      (wanders off to google to look)

      Barry Carlyon barry@barrycarlyon.co.uk

        Hi,

        You can keep the file in your cgi-bin directory. I think you can add the directives in htaccess file. Only condition is that it should be of scope outside <DIRECTORY> or <FILE> tags. see Perl Directives & allowed locations

        Cheers !

        --VC



        There are three sides to any argument.....
        your side, my side and the right side.

Re: perl website - htaccess
by moritz (Cardinal) on Sep 03, 2007 at 17:36 UTC
    It seems the site runs with mod_perl - you should check if your hoster supports that. If not, find one who does.

    Honestly, hosting isn't that expensive, it's certainly much less expensive than rewrite your application to work without mod_perl.

      they say mod-perl is enabled

      Barry Carlyon barry@barrycarlyon.co.uk

      We have just moved servers against my advice so i dont think my boss would be happy

      Barry Carlyon barry@barrycarlyon.co.uk