Cga


Results 1 to 8 of 8

Thread: Cga

  1. #1
    Join Date
    Jul 2010
    Posts
    11

    Cgi

    I have a shell script wich want to i make it web based preferly by php in fedora.my teacher saied me i can do it bye CGI.i dont now nothing about it.plz help.tanx
    Last edited by fatook; 08-27-2010 at 08:37 AM.

  2. #2
    Join Date
    Aug 2001
    Location
    Somewhere, Texas
    Posts
    9,627
    Please don't cross post, we can see the one just fine

    Other then that the question doesn't make sense, re-write a script to PHP using CGA? CGA is an old graphics display or did I miss something? We also don't do home work here either.

    Try rewording the question with more details of what you are trying to accomplish.

  3. #3
    Join Date
    Jul 2003
    Location
    Spokane, Washington
    Posts
    580
    I believe there is an archaic web scripting language by the same acronym (or a similar one); I'm talking about 10 to 12 years ago. I couldn't find it by google or wikipedia search, though.

  4. #4
    Join Date
    Jul 2003
    Location
    Spokane, Washington
    Posts
    580
    It's called CGI, and it's more of a framework than a language. PHP is an implementation of it/PHP uses CGI.

  5. #5
    Join Date
    Jul 2010
    Posts
    11

    Unhappy

    tanx.u know i have a shell script just I want to make it web based.

  6. #6
    Join Date
    Jul 2010
    Posts
    11

    Unhappy

    Quote Originally Posted by Icarus View Post
    Please don't cross post, we can see the one just fine

    Other then that the question doesn't make sense, re-write a script to PHP using CGA? CGA is an old graphics display or did I miss something? We also don't do home work here either.

    Try rewording the question with more details of what you are trying to accomplish.
    u are not have to reply my question.and it is not a homeworke it is just a part of my final project.it is CGI.i made a firewall with user interface,now i should web based it.i dont have any info about web in linux.

  7. #7
    Join Date
    Jul 2010
    Posts
    11

    Red face

    hi.english is my secode language so sorry for any mistake.my problem was :
    i want to run shell scripts in web with php.it worked in simple command like :
    <?php
    $output = shell_exec('ls -lart');
    echo "<pre>$output</pre>";
    ?>
    but when i test with command like " service iptables start " it dosent work.because of limit access.
    i think in the browser,php is runng under one user,bu when u run it in bash,it is likely running with your user premmission(root)
    i added "chmod +x ..." to command but it dosnt work yet!


    it is solved.
    solution:

    i added "apache ALL=NOPASSWD : ALL" to "/etc/sudoers" file
    and make COMMENT " Defaults requiretty" to "/etc/sudoers" file

    i can do "# service iptables start " or ...

    now the the problem is that i have GUI "dialog utility " in my scripts.when i run it in web it dosent work and the errors are so strange.its like that i cant run dialog utility in web.what do u think about it?tanx
    Last edited by fatook; 09-02-2010 at 09:37 AM.

  8. #8
    Join Date
    Sep 2003
    Location
    Rochester, MN
    Posts
    3,604
    You're not going to be able to run anything GUI from a web script. If you want to have a GUI interface you're going to have to rewrite at least the GUI part in something like PHP that can be displayed on a web page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •