Closed GoogleCodeExporter closed 9 years ago
Python tested and works fine with Mongoose, the config file is:
cgi_interpreter C:\python27_32bit\python.exe
cgi_pattern **.py$|**.pyc$
Example py script:
import sys
print("Content-Type: text/html")
print("")
print("Hello world from Python!<br>")
print("Python version: %s" % sys.version)
Original comment by czarek.t...@gmail.com
on 17 Jan 2013 at 7:45
Perl also works fine, the config file is:
cgi_interpreter perl-5.16.2.1-32bit\perl\bin\perl.exe
cgi_pattern **.pl$
Example perl script:
print "Content-Type: text/html\n";
print "\n";
print "Hello World from Perl!<br>";
print "Perl version: " . $^V;
Original comment by czarek.t...@gmail.com
on 17 Jan 2013 at 7:54
Add index_files option to mongoose.conf so that script is executed
immediately without displaying directory listing:
index_files index.py,index.pyc
The same for perl & ruby.
Original comment by czarek.t...@gmail.com
on 17 Jan 2013 at 8:02
Ruby works fine, example config:
cgi_interpreter ruby-1.9.3-p362-i386-mingw32\bin\ruby.exe
cgi_pattern **.rb$
index_files index.rb
Example script:
puts "Content-Type: text/html"
puts ""
puts "Hello world from Ruby!<br>"
puts "Ruby version: ", RUBY_VERSION
Output:
Hello world from Ruby!
Ruby version: 1.9.3
Original comment by czarek.t...@gmail.com
on 17 Jan 2013 at 8:09
Examples for Perl, Python & Ruby created, see this wiki page for downloads:
http://code.google.com/p/phpdesktop/wiki/EmbeddingOtherScriptingLanguages
Original comment by czarek.t...@gmail.com
on 19 Jan 2013 at 11:29
Original issue reported on code.google.com by
czarek.t...@gmail.com
on 17 Jan 2013 at 7:32