PDA

View Full Version : cgicc help



wacind
April 3rd, 2007, 03:37 PM
Hi

Im trying to set up cgi c++ but im running into a few issues

first i created a testcgi.hmtl file and placed that in /var/www/html

i created a testcgi.cpp comiled that using

g++ -o testcgi testcgi.cpp -lcgicc

i then placed testcgi into /var/www/cgi-bin

but my code doesnt seem to work. i get the error

The requested URL /cgi-bin/testcgi was not found on this server.

I tried following this tutorial. (http://www.yolinux.com/TUTORIALS/LinuxTutorialC++CGI.html)

Thanks
wacind

pmasiar
April 3rd, 2007, 04:03 PM
Im trying to set up cgi c++ but im running into a few issues

CGI - like web application? in C++? maybe you want to try some language better suited for web apps, like Python or Ruby?

Simple exampe in Python (to start, 3 lines): http://learnpython.pbwiki.com/WebApplication

lnostdal
April 3rd, 2007, 04:09 PM
C/C++ for web-programming isn't a good idea, but: http://ubuntuforums.org/showpost.php?p=2359669&postcount=4

Wybiral
April 3rd, 2007, 04:10 PM
I agree that C++ isn't the greatest for web design, lol. But anyway, I got GCI properly set up on apache2, here was my post:
http://www.ubuntuforums.org/showthread.php?t=394403

wacind
April 3rd, 2007, 05:12 PM
hi

thanks for your replies

i did exactly as you wrote Inostdal, but i still get the error
The requested URL /cgi-bin/test was not found on this server.

when i do ./test i get the correct output on the terminal

I dont know if it may be a problem with permissions.

only reason im using c++ cause its a school project

thanks
wacind

lnostdal
April 3rd, 2007, 05:16 PM
the url is host/~username/cgi-bin/test .. not host/cgi-bin/test

wacind
April 3rd, 2007, 05:32 PM
thanks, it was a dumb mistake on my part