Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Feb 2003
    Posts
    252

    Default Other files besides perl scripts in the cgi-bin

    Does anyone know how to run files other than perl scripts inside the cgi-bin? It seems any file accessed from inside the cgi-bin is being executed as if it was a perl script. That causes problems for images and HTML files which don't need to be executed.

    Thanks
    Mike

  2. #2
    Member
    Join Date
    Mar 2002
    Location
    Alberta, Canada
    Posts
    1,509

    Default

    The 'cgi-bin' is a protected, specific directory, designed only to run 'cgi - pl' scripts and associated info files; i.e., *.dat, *.txt, *.inc, etc. It was never designed for anything other than that, so; html, php, images, other type files, will not work.

    If a 'cgi - pl' script calls or results to, an html file or needed images, they need to be accessed from 'document root' and the path = /images/image.gif or path = /file.html. This tells the script to 'jump out' of the 'cgi-bin' and start looking for the file from the beginning of 'document root' -- which is also where the Home Page for the site is, in case you were wondering.
    Helping people Host, Create, and Maintain their Web Site
    Also providing Server Admin Services - setup / troubleshooting

    http://potentproducts.com/

  3. #3
    Member bmcpanel's Avatar
    Join Date
    Jun 2002
    Posts
    546

    Default

    I believe this has to do with SUEXEC operating on the server. I may be wrong. If you turn off SUEXEC, I think that you will be able to put other NON-CGI files in the cgi-bin.

    Again, I am not sure about SUEXEC causing this, but it seems like I first noticed this same cgi-bin behavior after installing SUEXEC last year.

  4. #4
    Member
    Join Date
    Mar 2002
    Location
    Alberta, Canada
    Posts
    1,509

    Default

    suexec is related to how 'cgi-bin' works, but we all know (or should) that running a Server without suexec, is like a day without Sunshine -- the security holes would be so wide & deep, it would be a dark day indeed.
    Helping people Host, Create, and Maintain their Web Site
    Also providing Server Admin Services - setup / troubleshooting

    http://potentproducts.com/

  5. #5
    Member
    Join Date
    Feb 2003
    Posts
    252

    Default

    Thats kind of what I thought, thanks everyone.

    Mike

Similar Threads & Tags
Similar threads

  1. what is /usr/bin/perl -w hnc.cgi
    By moinkhan31 in forum Security
    Replies: 9
    Last Post: 12-06-2008, 09:13 AM
  2. cgi files are only working in the cgi-bin after upgrading with easyapache3
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-19-2007, 09:11 AM
  3. Perl Not working (cgi-bin)
    By flashweb in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 07-25-2007, 04:48 PM
  4. cgi-bin vs. scgi-bin vs. perl
    By Boboss in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-21-2006, 11:27 AM
  5. cgi-bin / perl won't run
    By netnexi in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-15-2004, 10:12 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube