#1 (permalink)  
Old 07-26-2004, 01:12 PM
Registered User
 
Join Date: Oct 2001
Posts: 651
Marty is on a distinguished road
Script Execution Issue

I ran into this problem yesterday. First, we do not run suexec on our servers. I know many think this is odd, but it is our preference and we have never had difficulties without it.

We have two servers that I am going to compare here.

On server 1, you can run cgi scripts with either the .pl or the .cgi extension in the scgi-bin of any account without problems.

On server 2, you can run cgi scripts with the .cgi extension, but the .pl extension will create a 500 internal server error every time.

These are both cpanel servers, server 1 is RH 7.3 and server 2 is RH 9. I have checked permissions and ownership and all is the same.

Actually, I can put a my.pl on server 2 in the scgi-bin and it will 500 error, but if I simply rename the file my.cgi, it will work perfectly.

I have tried to search the httpd.conf files on each server for differences related to script aliases, etc, but can find no differences.

Anybody have any suggestions as to what would cause this difference in behaviour?
__________________
Marty Hoskins
TLC Web Enterprises
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-26-2004, 01:55 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,994
PWSowner is on a distinguished road
A couple possibilities I can think of. First, in your httpd.conf files, do they both contain the same following line?

AddHandler cgi-script .cgi .pl

Second, any chance the scripts are being uploaded from a different ftp program that may be uploading .pl's to server 2 in binary format?

Have you tried adding:

use CGI::Carp qw(fatalsToBrowser);

to the scripts to see if that tells you anything?
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-26-2004, 03:31 PM
Registered User
 
Join Date: Oct 2001
Posts: 651
Marty is on a distinguished road
Quote:
First, in your httpd.conf files, do they both contain the same following line?

AddHandler cgi-script .cgi .pl
Yes, that exists on both servers. That was the first thing I checked.

Quote:
Second, any chance the scripts are being uploaded from a different ftp program that may be uploading .pl's to server 2 in binary format?
No, that is not possible. I uploaded it to server two as .pl and it produced a 500 error. I ssh'd in and did a

mv my.pl my.cgi

and it worked fine with the cgi extension.

Quote:
Have you tried adding:

use CGI::Carp qw(fatalsToBrowser);

to the scripts to see if that tells you anything?
No, I haven't tried that. I will have to give that a whirl. If you have any other ideas, I will be glad to hear it.
__________________
Marty Hoskins
TLC Web Enterprises
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-27-2004, 05:02 AM
Registered User
 
Join Date: Oct 2001
Posts: 651
Marty is on a distinguished road
Quote:
Originally Posted by squirrel
Have you tried adding:

use CGI::Carp qw(fatalsToBrowser);

to the scripts to see if that tells you anything?
Tried it and got the same 500 errors as before. Not a thing new.
__________________
Marty Hoskins
TLC Web Enterprises
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-27-2004, 05:28 AM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
What errors do you get in /etc/httpd/logs/error_log when you browse to it as a .pl script?
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-27-2004, 05:47 AM
Registered User
 
Join Date: Oct 2001
Posts: 651
Marty is on a distinguished road
[Tue Jul 27 06:46:28 2004] [error] [client *.*.*.*] Premature end of script headers: /usr/local/cpanel/cgi-sys/scgiwrap
__________________
Marty Hoskins
TLC Web Enterprises
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:41 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc