Hey,
This is the example I keep seeing online as how to set cookies.
require "cgi"
cookie = CGI::Cookie.new("rubyweb", "CustID=123", "Part=ABC");
cgi = CGI.new("html3")
cgi.out( "cookie" => [cookie] ){
cgi.html{
"\nHTML content here"
}
}
I tried doing it this way and it sets the cookie and then comes up with a blank page.
#...
I've just written (in Perl) a simple web service that displays a web form containing a single "file" type upload field and a single Submit button. I made this simple web page with the intent that a human could use it and also that a script on a different machine could also execute it programatically. I got the human part all done and t...
I've written a python CGI script that converts files into .jpgs and displays them in a simple HTML page. I don't want to clutter up the folders with these .jpg files, so I used tempfile.NamedTemporaryFile to create a file to store the converted .jpg output. Everything works great, but i want to remove this file after the page is displa...
I tried just creating a test.rb file putting it in the public directory then calling it like http://localhost:3000/test.rb but that doesn't seem to work. It thinks I'm trying to download the file. What am I missing here? the little script is below:
#!/usr/local/bin/ ruby
print "HTTP/1.0 200 OK\r\n"
print "Content-type: text/html\r\n\r\n...
I'm looking to make my CGI forum software FastCGI compatible.
The forum software consists of a few dlls and .exe (.cgi) files written in C and x86 assembly language. I also have a SQlite3 database.
Lighttpd runs all these cgi scripts as child processes and I much say that the whole thing works pretty damn well.
But I want to experiment...
I'm using apache 2.2 (part of the xampp distribution) and I was trying to load my scripts written in lua using fastcgi, so I added to httpd.conf this:
LoadModule mod_fcgi modules/mod_fcgid.so
and now when I try to start apache I get the following error:
syntax error on line 530 of /xampp/apache/conf/httpd.conf: Can't locate API module...
I have this form:
<form name="input" action="http://s164074194.onlinehome.us/mail.py" method="POST">
Username:
<input type="text" name="email" />
<input type="submit" value="Submit" />
</form>
On submission, the mail.py script is called and the user is redirected to its output...
I'd like the user to just stay on the same page as the...
I have a default Apache 2.2 system setup with a Perl CGI script directory configured like so:
ScriptAlias /jarvis/ "/opt/jarvis/cgi-bin/"
Nothing fancy in here except one of my scripts takes over 10 minutes to process, and due to various reasons, prints out nothing during this time.
Apache appears to have a timeframe of 10 minutes (6...
Is Apache configured for windows the best way to go? Does it have any issues running cgi?
...
After upgrading Perl, I receive some errors in a Perl CGI script:
Unquoted string "type" may clash with future reserved word at convertit.cgi
line 183. Can't modify constant item in scalar assignment at convertit.cgi
line 183, near ""text/javascript\">flashPreloadFinish
('http://www.myurl.com/mysite.html');\n";"
convertit.cgi...
HI,
I have written a program in Perl using the DBI module. Can I display the output of MySQL using CGI? If so please help me.
program:
#!/usr/bin/perl -w
use DBI;
print "Content-type:text/html\n\n";
$db_handle = DBI->connect("dbi:mysql:database=CYP1B1;host=localhost:192.168.3.93;")
or die "Couldn't connect to database: $DBI::e...
Hi all,
here is my problem...
I have a python script that, once executed from command line, performs the needed operations and exit. If, during the execution, the program is not able to perform a choice, he prompts the user and asks them to take a decision !
Now I have to implement a web interface, and here comes the problems ... I crea...
Hi, I think one commonly known way of adding PHP to an Apache webserver is to configure it like this:
ScriptAlias /php5.3 /usr/local/php5.3/bin
Action application/php5.3 /php5.3/php-cgi
AddType application/php5.3 .php
Now I tried to write a similar configuration for Python:
ScriptAlias /python /usr/bin
Action application/python /pyth...
Hello,
I'm trying to get the query_string from a Ruby file. For example;
http://localhost/rubyfile.rb?hello=world
I would like to be able to ask what's hello and for it to print "world", but for the life of me I cannot find the correct syntax/way to do it anywhere. Even the Ruby documentation seems dazed.
#!/program files (x86)/ruby/...
I understand that letting any anonymous user upload any sort of file in general can be dangerous, especially if it's code. However, I have an idea to let users upload custom AI scripts to my website. I would provide the template so that the user could compete with other AI's in an online web game I wrote in Python. I either need a soluti...
Hi to all,
I have one Python module that can be called by a CGI script (passing it information from a form) or from the command line (passing it options and arguments from the command line).
Is there a way to establish if the module has been called from the CGI script or from the command line ??
...
we have to work with RL-RTX (RTOS) in our project.in that we have to do some web pages.we have experience in building web pages in linux using "go-ahead webserver".
can we code in c language and store that executable in .cgi extension and call from the browser?
please tell us.
...
I have a form in an HTM page that, after pressing the submit button, calls the index.cgi !
#!/usr/bin/sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/nastools/pysqlite2/pysqlite2
export PYTHONPATH=$PYTHONPATH:/nastools/pysqlite2/:/remote/users5/amuharem/eclipse/important_stuff/amar/impo
export PATH=/nastools/python64/bin/:$PATH
python /re...
For hobby purposes, I have a shared space on a hosting server that is providing, as many of them are, both PHP and Perl CGI. I have read on several places that CGI scripts are obsolete now, I think mainly for performance issues (like http://stackoverflow.com/questions/313083/is-php-or-vanilla-perl-cgi-faster).
But since I just started ...
Hi, my friend and I are creating a log parser for a series of games. We have written the frontend (web) in PHP/MySQL and the parser in Perl (also using MySQL, of course). Now we are having problems getting these two to communicate.
All we wan't to do is this: one administration page online where you have the button "parse". When you cli...