27 users online (1 members and 26 guests)  


  Results 1 to 2 of 2

Related

  1. Perl commands in an input file to cgi script    Forum: CGI Perl Forum
    Replies: 0
  2. Unix command output displayed 0 in browser    Forum: CGI Perl Forum
    Replies: 0
  3. Running shell commands from Perl    Forum: CGI Perl Forum
    Replies: 1
  4. Need a reliable, full featured unix hosting?    Forum: Web Hosting Forum
    Replies: 0
  5. Cheap Unix Hosting    Forum: Web Hosting Forum
    Replies: 6
  1. #1
    kalpana_d's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    2

    How to use UNIX commands inside CGI script

    Hi,

    I want to establish a SSH connection between one unix box to another. I have included the SSH command inside the cgi script. When i run this script through browser the error "sh: ssh: not found " is being displayed in the browser but the same script works fine when i run in the command prompt with "perl" keyword. Does the Unix command "SSH" given inside cgi script require any special format of representation other than back ticks "`" and system(" ") ? Please let me know if there is any other way to solve this problem!

    Thanks & Regards,
    Kalpana.

  2. #2
    uthus's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2006
    Location
    Ft Hood
    Posts
    75

    Re: How to use UNIX commands inside CGI script

    Hi,

    Could the problem be related to the user running the script? Apache starts as root on my box and then changes to nobody (I believe). There are some things that just will not run as nobody.

    u



Tags for this Thread