Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13
Originally Posted by Roboserg echo $SHELL gives me /bin/sh sh testcgi.sh works. Being in the directory where testcgi.sh is and invoking ./testcgi.sh gives me: -sh: ./testcgi.sh: not found Its a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86

    Quote Originally Posted by Roboserg View Post
    echo $SHELL gives me /bin/sh
    sh testcgi.sh works. Being in the directory where testcgi.sh is and invoking ./testcgi.sh gives me:
    -sh: ./testcgi.sh: not found

    Its a normal linux with a normal sh shell =)
    Running the script with the relative path "./script" requires the "execute" right turned on but since you already ran "chmod 777" I have no idea why it's not working.
    Perhaps some variables in your system are not correctly set. Try using the full absolute path: "/root/webserver/cgi-bin/testcgi"

  2. #12
    Just Joined!
    Join Date
    Nov 2012
    Posts
    6
    Thanks, I already saw the first link, but as you can see they dont implicitly turn CGI scripts on. I do the same as they do just calling IP/cgi-bin/testcgi but I get "404 page not found"

    If I call the script with the full path like you said I get
    -sh: /root/web/cgi-bin/testcgi.sh: not found

    I double checked the rights and the file has the following chmod: rwxrwxrwx

  3. #13
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    You should also check the log files of your httpd server to see what happened when the "page cannot be displayed" message appeared.

    Perhaps you'll find them in /var/log/messages (but not sure).

    Overall, I think the cgi option is not enabled for your httpd. I saw a post where someone said this was pre-enabled after busybox 1.17. I don't know if this will help you at all but here's the link:

    https://bugs.launchpad.net/ubuntu/+s...ox/+bug/710634

    Cheers,
    Srj

  4. $spacer_open
    $spacer_close
Page 2 of 2 FirstFirst 1 2

Posting Permissions

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