Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Oct 2001
    Posts
    651

    Default 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

  2. #2
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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

  3. #3
    Member
    Join Date
    Oct 2001
    Posts
    651

    Default

    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.

    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.

    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

  4. #4
    Member
    Join Date
    Oct 2001
    Posts
    651

    Default

    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

  5. #5
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    What errors do you get in /etc/httpd/logs/error_log when you browse to it as a .pl script?
    Jonathan Michaelson

    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

  6. #6
    Member
    Join Date
    Oct 2001
    Posts
    651

    Default

    [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

Similar Threads & Tags
Similar threads

  1. Restricting image directory script execution
    By tvcnet in forum Security
    Replies: 9
    Last Post: 03-21-2010, 07:46 PM
  2. Backup Script Issue
    By crazyace in forum New User Questions
    Replies: 5
    Last Post: 11-25-2009, 07:55 PM
  3. jsp script issue
    By rseshan in forum cPanel Developers
    Replies: 3
    Last Post: 06-10-2007, 11:21 AM
  4. mysql issue with database/script
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-06-2005, 04:26 PM
  5. Script execution problem
    By Myron in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-31-2005, 02:38 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube