Powered by:
FutureQuest Hosting


"...Remember being a youngster, mom or dad telling you "close the door"? Well the same applies to HTML ...."

Web Hosting
Shared       
Reseller     
VPS             
Dedicated 
Price:   $(US)
Space:     (MB)
Transfer:(GB)
Platform:


Advertise
Advertising Opportunities
Rate Card

Sponsor
Go Back   Webmaster Forums > Code Forum > CGI Perl Forum


Reply
 
Thread Tools Rate this Webmaster Discussion
  #1  
Old 07-21-2009, 01:07 PM
shaiss shaiss is offline
Junior Member
 
Join Date: Jul 2009
Webmaster Discussions: 2
Rep Power: 3
shaiss is on a distinguished road
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";


Reply With Quote
  #2  
Old 07-22-2009, 10:18 AM
jthayne's Avatar
jthayne jthayne is offline
Senior Member
 
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 492
Rep Power: 15
jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz. jthayne is the hardest working person in the biz.
Re: Noob CGI user Question

I am not sure why your script is not running, but try the one posted here.
__________________
Be sure to click the reputation icon to give rep to the person who helped you.
Check out the following sites: www.inbutnotoftheworld.com and www.mythoughtexactly.com.
Reply With Quote
  #3  
Old 07-22-2009, 01:10 PM
shaiss shaiss is offline
Junior Member
 
Join Date: Jul 2009
Webmaster Discussions: 2
Rep Power: 3
shaiss is on a distinguished road
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!
Reply With Quote
Reply
Sponsor

Bookmarks

Tags
cgi , noob , question , user

Thread Tools
Rate This Thread
Rate This Thread:

 

Similar Webmaster Discussions
Thread Webmaster Discussion Starter Forum Replies Last Post
php noob needs help rebz01 PHP Forum 6 10-20-2009 06:49 PM
want to echange links noob here need help zrohder Link Exchange 0 08-13-2007 07:28 AM
guestbook help (noob) Trinthakis CGI Perl Forum 1 12-05-2005 05:04 PM
Noob coder deadfinger04 HTML Forum 2 08-10-2004 03:29 PM
What do you think of my site... (noob) interpim Show it off! 1 06-11-2004 05:06 PM


All times are GMT -5. The time now is 10:37 PM.

Copyright © 1999 - 2009 Advanced HTML For Beginners and AHFB2000. All rights reserved.
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.