mod_perl support

hncryptologist

New member
Joined
Feb 4, 2004
Messages
3
Location
Hanoi, Vietnam
I love Perl! Although today Perl is not dominant as years ago, its market share is still good, so why don't DirectAdmin support mod_perl as Ensim does?
with mod_perl you will need a little more RAM to load the Perl intepreter in, but it'll make scripts run faster, and you don't have to worry about client's cgi scripts which are eating up your CPU performance any more.
Why do you load PHP in but not Perl? It's not fair.
 
Hello,

Please do a bit more research :)
We *do* include mod_perl.

Apache header info:
Apache/1.3.29 (Unix) mod_ssl/2.8.16 OpenSSL/0.9.6j PHP/4.3.4 mod_perl/1.27 FrontPage/5.0.2.2510

John
 
I know directadmin includes mod_perl in its distro just after posting the thread, but I am just unable to findout how to use it :)

I mean you should include in the control panel a tool to create folders dedicated to mod_perl and/or cgi-bin. Please consult ensim for this feature.

Thank you !
Nam
 
hncryptologist said:
please consult ensim for this feature.

Thank you !
Nam

:eek: For some reason, I dont think Ensim would co-operate well !

PM me and I will advise you on where you can find the configs ensim uses (on an ensim server- assuming you have one...)

Chris
 
ensim?

Since I'm not a native English speaker, it's likely that I made you confused, sorry :)
I mean please copy this ensim's feature to directadmin. It's to create a perl-bin folder which is to store mod_perl compatible .pl files. And it's great if I can create mod_perl handlers for apache using GUI of directadmin. If you know Perl well, you can add awesome features that other softwares don't have, and win Perl hardcore programmers.
 
Hello,

hncryptologist, you are right. I did some quick reseach at perl.apache.org and some config lines are required. I tried it out with .htaccess files, and that worked fine. I created an .htaccess in the cgi-bin as:
Code:
PerlModule Apache::PerlRun
SetHandler perl-script
PerlHandler Apache::PerlRun
Options ExecCGI
PerlSendHeader On
allow from all
and the mod_perl environment was passed when I ran the printenv script, so it appears to do the trick.

John
 
mod_perl

Hi,

I recently tried executing a perlscript out of one of my user's homedir. I followed the instruction from the previous post for the .htaccess. When I try to execute a simple echo "blah blah lah" ; I get an error message.


String found where operator expected at /home/manacan/domains/manacan.ca/public_html/test.pl line 2, near "#line 1 /home/manacan/domains/manacan.ca/public_html/test.pl
#!/usr/bin/perl
echo "testasdf asdf asdf asdf""
(Missing operator before "testasdf asdf asdf asdf"?)
[Sun Sep 5 15:44:27 2004] [error] PerlRun: `syntax error at /home/manacan/domains/manacan.ca/public_html/test.pl line 2, near "#line 1 /home/manacan/domains/manacan.ca/public_html/test.pl\n#!/usr/bin/perl\necho "testasdf asdf asdf asdf""\n'
[Sun Sep 5 15:44:27 2004] [error] /home/manacan/domains/manacan.ca/public_html/500.shtml not found or unable to stat



The file is mod 755. I think I probably messed up something last night when I did an apt-get install lynx and it was asking me to upgrade mod_perl.




Erik
 
you can check: /usr/bin/perl yourscript.pl and look if gives correct output.

If you've placed the file in the CGI-BIN and directly point to it from your browser it should be correct. If the permissions are set correctly and the user/group (suexec will put lines in the /var/log/httpd/suexec... something)

If it isn't the cgi-bin a simple (correct permissions) .htacces file with the following line:

Options +ExecCGI


Would be ok.

As it does on my server Fedora C 1
 
perl

For some reason perl test.pl doesn't output anything... I was corrected by a friend earlier, he indicated to me there's no echo in perl, it's print. So the new file looks like this:


#!/usr/bin/perl
print "testasf";

yet whne I try to run it I get nothing:

[root@gatekeeper public_html]# perl test.pl
[root@gatekeeper public_html]#


Erik
 
Script is OK (just in case)

perl -e "print 'test';"
test[xxxx@server01 xxxx]#


Try (re)installing perl from tarball this will probaly fix things up ;)

(perl.com) ;)
 
perl is broken

Hi,


I just upgraded perl to the latest version and it's still broken. This doesn't seem to make sense to me I get no output from perl even with that script.. I've shown this to a few ppl and all they could say was "your perl is broken dude" and it stops there, they can't seem to figure out why.


Erik
 
Ok so I'm not too knowledgeful in perl but here is what someone helping me explained:

[08:44PM]<@woggle> So always output with a newline at the end.
[08:44PM]<@woggle> Or similar.
[08:44PM]<@woggle> If you leave an incomplete line your shell will overwrite it.
[08:44PM]<@woggle> You can see this pretty clearly with perl -e 'print "0123456789"x10'
[08:45PM]<@woggle> Perhaps. Your applications should be well behaved anyways...
[08:45PM]<@woggle> that is, well-behaved enough to end output in a newline.
[08:45PM]<@woggle> Any breakage of your perl apps is entirely unrelated, unless it is about not seeing the last line of
output.


Erik
 
Last edited:
Back
Top