Sponsored Content
Full Discussion: Need help with cgi and so on
Top Forums Web Development Need help with cgi and so on Post 302367091 by cryp0r on Sunday 1st of November 2009 01:44:13 PM
Old 11-01-2009
Ok, done all but no success.
I would make all new if someone can give me step by step instructions.
All i wanne do is to run an .exe-file in an screen session.
start it with:

mono my.exe

This programm should run in an screen - session.
And now i want to send commands to this programm.
The commands should come from web.
Smilie

---------- Post updated at 01:44 PM ---------- Previous update was at 07:50 AM ----------

Ok, forget my previos post.

I have played a litte and found something that makes me wonder.

My logut.cgi
Code:
#!/bin/sh

echo 'Content-type: text/html'
echo

echo '<html>'
echo '<body>'
echo '<center><h1>'


sudo -u username /home/bots/logout.sh

echo '</h1></center>'
echo '</body>'
echo '</html>'

And i edited the sudoers like:

Code:
username   ALL=(ALL) NOPASSWD: /home/bots/logout.sh

If i check the error_log i find:

Code:
[Sun Nov 01 17:13:25 2009] [error] [client ***.***.***.***] usernames's password:

Where is here the problem? I think the path is right.

Last edited by cryp0r; 11-01-2009 at 02:52 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl CGI.pm

my box is FreeBSD4.3 and I use Perl 5.0005_03. Here is the CGI script. test.cgi ...... if ($query->action eq 'detail') { ...... print $query->hidden('action', 'modify'); ...... } I found that the result of test.cgi?action=detail is not what I expected. the script does not... (4 Replies)
Discussion started by: tonyt
4 Replies

2. Shell Programming and Scripting

cgi

I am having trouble running my perl cgi on the Internet. After i put the cgi file into the public_html directory and try to browse it on the internet, it returns me the exact content of the cgi file. Is the file permission 755 for the cgi file correct? My path to perl is something like ... (2 Replies)
Discussion started by: vince
2 Replies

3. Shell Programming and Scripting

CGI passing arrays/hashes to another CGI script

If I have a Perl CGI script (script01), which fills an array(s) with information and outputs a HTML page with a link to another CGI page (script02); is there anyway to pass the array(s) from "script01" to "script02" when the page visitor clicks the link? Hope that makes sense! :) (2 Replies)
Discussion started by: WIntellect
2 Replies

4. Shell Programming and Scripting

CGI problem

1. I need CGI in my own server. plz tell me how do it ? 2. U know somethink FREE servers with CGI ? thanks cYa (2 Replies)
Discussion started by: kezzol
2 Replies

5. UNIX for Dummies Questions & Answers

Running cgi

I am learning about cgi and having lots of trouble. If I am on a server cs-srv2.(schoolname).edu and I want to run cgi script what would I need to do? By the way, I see $ on the command line when my server opens , if that makes a difference. I created a cgi-bin directory and put it in there. The... (3 Replies)
Discussion started by: CSGUY
3 Replies

6. Solaris

apache ErrorDocument 400 /cgi-bin/400.cgi

Hi All, Sorry if the question is trivial for you but, I am new to Apache (2.0.63) and am trying to figure out how to display my 400.cgi. Here is what I have in httpd.conf servername testing DocumentRoot "/usr/local/apache2/htdocs" ErrorDocument 400 /cgi-bin/badrequest-400.cgi Here is... (0 Replies)
Discussion started by: afadaghi
0 Replies

7. Web Development

problem with exporting vairable from one perl cgi to another perl cgi script while redirecting.

Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect. Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is redirected to welcome page. My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies

8. Shell Programming and Scripting

Perl cgi pages out of cgi-bin folder in WINDOWS

Hi team, I have a typical problem with cgi pages in apache webserver in WINDOWS I am able to execute(display) the pages that are saved in cgi-bin folder. But I am not able to execute the pages stored in htdocs or other folder other than cgi-bin folder. Could anyone please let me know how... (1 Reply)
Discussion started by: scriptscript
1 Replies

9. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

10. Shell Programming and Scripting

CGI Perl : while loop in CGI perl

Hi Team, I am trying to connect to database(succeeded ) and print the records on the browser using while loop. But the elements of array are not displayed instead while loop is displayed directly. Instead of the below I can embed html statements in print but I am looking for the below style as I... (1 Reply)
Discussion started by: scriptscript
1 Replies
cgi_redirect(3) 						     cgi/cgi.h							   cgi_redirect(3)

NAME
cgi_redirect - send an HTTP 302 redirect response SYNOPSIS
#include <cgi/cgi.h> void cgi_redirect (CGI *cgi, const char *fmt, ...) ATTRIBUTE_PRINTF(2,3); ARGUMENTS
cgi - cgi struct fmt - printf style format with args DESCRIPTION
cgi_redirect will redirect the user to another page on your site. This version takes only the path portion of the URL. As with all printf style commands, you should not call this with arbitrary input that may contain % characters, if you are forwarding something directly, use a format like cgi_redirect (cgi, "%s", buf) RETURN VALUE
None SEE ALSO
cgi_debug_init(3), cgi_parse(3), cgi_destroy(3), cgi_js_escape(3), cgi_html_escape_strfunc(3), cgi_register_strfuncs(3), cgi_output(3), parse_rfc2388(3), cgi_url_validate(3), open_upload(3), cgi_cs_init(3), cgi_url_escape_more(3), cgi_html_strip_strfunc(3), cgi_neo_error(3), cgi_redirect(3), cgi_filehandle(3), cgi_register_parse_cb(3), cgi_url_escape(3), cgi_init(3), cgi_redirect_uri(3), cgi_cookie_clear(3), cgi_url_unescape(3), cgi_vredirect(3), cgi_display(3), cgi_html_ws_strip(3), cgi_error(3), cgi_cookie_set(3), cgi_text_html_strfunc(3), cgi_cookie_authority ClearSilver 12 July 2007 cgi_redirect(3)
All times are GMT -4. The time now is 02:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy