CGI Scripting Question - Redhat

This is a discussion on CGI Scripting Question - Redhat ; I've installed RHEL 4 WS on a PC and I am having some trouble with cgi scripts. I finally got the scripts to put out HTML, but the part that collects and displays data from my application is not working. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: CGI Scripting Question

  1. CGI Scripting Question

    I've installed RHEL 4 WS on a PC and I am having some trouble with cgi
    scripts.

    I finally got the scripts to put out HTML, but the part that collects
    and displays data from my application is not working. I get no HTML
    output to the screen when I run them in the /var/www/cgi-bin directory.


    I've copies the scripts to /tmp/cgi-bin. I get HTML output on the
    screen and the data collection & display works correctly when run the
    same script from /tmp/cgi-bin.

    I can run the two copies of the script as root or apache with the same
    results.

    Anyone have any ideas on how to correct this problem?


  2. Re: CGI Scripting Question

    Don wrote:
    > I've installed RHEL 4 WS on a PC and I am having some trouble with cgi
    > scripts.
    >
    > I finally got the scripts to put out HTML, but the part that collects
    > and displays data from my application is not working. I get no HTML
    > output to the screen when I run them in the /var/www/cgi-bin directory.
    >
    >
    > I've copies the scripts to /tmp/cgi-bin. I get HTML output on the
    > screen and the data collection & display works correctly when run the
    > same script from /tmp/cgi-bin.
    >
    > I can run the two copies of the script as root or apache with the same
    > results.
    >
    > Anyone have any ideas on how to correct this problem?
    >



    Look at /var/log/messages.

    I am sure, that selinux refuses to execute the scripts. Only apache is
    allowed to execute them.

    You can disable selinux or you can disable selinux for apache only. Run
    system-config-securitylevel for that.

    It is not a good idea though to disable selinux, since it protects your
    system very effectivly.

    I am also missing a good tutorial how to do cgi-skripting, html-document
    updloads via ftp, etc with selinux. Does anybody have any hints?

    greets Boris

  3. Re: CGI Scripting Question

    Hello Boris,

    You tip about turning off selinux was correct! I first turned on all
    of the options for httpd, but that seemed to be no change.

    Next, I turned off selinux completely. The web interface worked
    correctly after the system was rebooted.

    Thank you again for your help.

    Regards,

    Don


+ Reply to Thread