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

Go Back   LiteSpeed Support Forums > External Applications > CGI/Perl/Python > lscgid: execve(): Exec format error

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2007, 01:20 PM
Sparaker Sparaker is offline
Member
 
Join Date: Sep 2007
Posts: 12
Default lscgid: execve(): Exec format error

Hello,

I added fast cgi handler in perl. Perl scripts were working even when i haven't added anything for cgi. However they were running seperate processes for each request. I configured the external app like this:

Name lsperld
Address uds://tmp/lshttpd/lsperl.sock
Notes Not Set
Max Connections 20
Environment FCGI_PERL_MAX_REQ=500
Initial Request Timeout (secs) 120
Retry Timeout (secs) 0
Persistent Connection Yes
Connection Keepalive Timeout Not Set
Response Buffering No
Auto Start Yes
Command $SERVER_ROOT/fcgi-bin/lsperld.fpl
Back Log 100
Instances 20
Run On Start Up Not Set
Max Idle Time Not Set
Priority Not Set
Memory Soft Limit (bytes) 100M
Memory Hard Limit (bytes) 120M
Process Soft Limit 1000
Process Hard Limit 1100

Next I added a script handler for pl files.

Restarted the server and ran the script. The script still ran in a seperate process. I then removed this line from the top of my perl script "#!/usr/bin/perl" and it gave me this error: "lscgid: execve(): Exec format error"

The server can run .cgi extension files too even though i haven't added cgi extensions as a script handler ? are they added in by default ? How can i run the perl scripts as fast cgi process ?

I have installed the fastcgi module in perl.

Last edited by Sparaker; 09-17-2007 at 01:36 PM..
Reply With Quote
  #2  
Old 09-17-2007, 03:18 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
If the file is located inside a CGI context, it will be executed as CGI script.
Reply With Quote
  #3  
Old 09-17-2007, 07:47 PM
Sparaker Sparaker is offline
Member
 
Join Date: Sep 2007
Posts: 12
Quote:
Originally Posted by mistwang View Post
If the file is located inside a CGI context, it will be executed as CGI script.
What do you mean by CGI context ? the cgi-bin dir ?

The file is not inside the cgi-bin directory.
Reply With Quote
  #4  
Old 09-17-2007, 08:11 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
turn on debug logging and check error.log for configuration problem. Looks like your script is still configured to run as cgi, if you use LSWS with Apache httpd.conf, make sure "pl" is not configured to run CGI script. just remove related configuration.
Reply With Quote
  #5  
Old 09-18-2007, 03:24 AM
Sparaker Sparaker is offline
Member
 
Join Date: Sep 2007
Posts: 12
I'll check that now. Thanks.
Reply With Quote
  #6  
Old 09-18-2007, 03:48 AM
Sparaker Sparaker is offline
Member
 
Join Date: Sep 2007
Posts: 12
Works now. I removed the .pl config lines from httpd.conf. Thanks alot.
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:09 PM.



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