55 users online (1 members and 54 guests)  


  Results 1 to 3 of 3

Related

  1. php noob needs help    Forum: PHP Forum
    Replies: 6
  2. guestbook help (noob)    Forum: CGI Perl Forum
    Replies: 1
  3. Noob coder    Forum: HTML Forum
    Replies: 2
  4. What do you think of my site... (noob)    Forum: Show it off!
    Replies: 1
  1. #1
    shaiss's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2009
    Posts
    2

    Question Noob CGI user Question

    Anyone have CGI experience willing to help me out?

    Code:
    #include <stdio.h>
     
    int main(void)
    {
        int ch;
        while ((ch = getchar()) != EOF)
            putchar(ch);
        putchar('\n');
        return 0;
    }

    fails @ http://bit.ly/2jooFR

    it also fails when running it via terminal.

    I'm sure I'm doing something stupid. The reason I need this is we have several CGI scripts in C written and I need to call via my PHP scripts, but first I need to make sure I can even run CGI scripts in C on my server

    CGI in Pearl works, http://www.attendview.com/phptest/hello.pl
    Code:
    #!/usr/local/bin/perl
    
    # hello.pl -- my first perl script!
    
    print "Content-type: text/html\n\n";
    
    print "Hello, world!\n";

  2. #2
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: Noob CGI user Question

    I am not sure why your script is not running, but try the one posted here.

  3. #3
    shaiss's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2009
    Posts
    2

    Red face Re: Noob CGI user Question

    I didn't know that I had to compile the script as cgi.
    http://shaiperednik.com/2009/07/cgi-scripts-basics/

    Again, noob mistake. Thank you!



Tags for this Thread