LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > CGI/Perl/Python > How can I assign all scripts in a directory to perl?

Reply
 
Thread Tools Display Modes
  #1  
Old 08-20-2007, 06:52 AM
aenor aenor is offline
New Member
 
Join Date: Aug 2007
Posts: 4
Default How can I assign all scripts in a directory to perl?

Hello,

I am using Litespeed for a week now, as a replacement for apache.
I am actually trying to get TWiki working, and because TWiki uses
one directory with perl scripts without the .pl suffix I wondered
weather it is possible to assign all script in that directory to perl?

I allready assigned the CGI-Context to that directory but that only works for .pl-files.

I'm trying to find a better solution than renaming all the files to *.pl for a couple of hours now ... but nothing I tried worked ...

I hope you can help me, thank you ;-)
Reply With Quote
  #2  
Old 08-20-2007, 11:08 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Define a script handler for "pl" at server level using CGI handler.
In that directory, add "ForceType application/x-httpd-pl" configuration in .htaccess under that directory.
Reply With Quote
  #3  
Old 08-20-2007, 02:59 PM
aenor aenor is offline
New Member
 
Join Date: Aug 2007
Posts: 4
Thank you for your fast answer,

but I still can't get it working ...
I added application/x-httpd-pl to the mimetypes and
added a .htacces file in the main directory with that content:
Code:
<Directory /bin>
  ForceType application/x-httpd-pl
</Directory>
and because that didn't work one in the directory bin
Code:
ForceType application/x-httpd-pl
and some slightly different things ..
AllowOveride is on .... the Log doesn't show anything strange ...
I am not shure whether LSWS reads the .htacces file in the Directory /bin.
I hope you can help me.

Thanks in advance!
Reply With Quote
  #4  
Old 08-20-2007, 03:12 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You must add a script handler for "pl" file using the CGI handler at server level using our web admin console, it will added MIME type application/x-httpd-pl behind the scene. If you explicitly added that MIME type some where, it is not going to work.
Reply With Quote
  #5  
Old 08-20-2007, 03:40 PM
aenor aenor is offline
New Member
 
Join Date: Aug 2007
Posts: 4
Okay,
I added the CGI handler before before in the virtual host, but the log said that the mime-type application/x-httpd-pl is not configure ...
Now I added the CGI handler at server level
and tried the two .htacces files shown above ... on in the directory itself and as this din't work one in the htdocs directory.

the main directory is showing "lscgid: execve(): Permission denied"
this error may be because i haven't configured twiki yet

and when i go into the bin directory and whant to execute the sript firefox wants to download it and says that its type is application/octet-stream

I have no idea whats the problem ...
Reply With Quote
  #6  
Old 08-20-2007, 04:04 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Make sure to make those scripts executable "chmod a+x *".
And you can try "ForceType application/x-httpd-cgi" as well, should have the same effect.
Reply With Quote
  #7  
Old 08-20-2007, 04:30 PM
aenor aenor is offline
New Member
 
Join Date: Aug 2007
Posts: 4
Its realy strange ...
I think it is a Browser related problem ...
I normaly use firefox and firefox everytime said that the file I want is a application/octet-stream,
but then I tried to open it whith IE and it worked.

[Edit]
*Arg* just a cache issue ...
after restarting firefox everything is fine ...
it worked with "ForceType application/x-httpd-cgi"

Thank you very much for your help!

Last edited by aenor; 08-20-2007 at 04:37 PM..
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:02 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.