5,165 questions
Advice
0
votes
4
replies
70
views
How can I connect HTML and Python without using any libraries or frameworks?
Iâm trying to create a simple web project where a user submits data through an HTML form, and a Python script processes the input and returns a response. I want to do this without using any external ...
-1
votes
2
answers
181
views
CGI in Perl: how to access the original HTTP headers
A simple proxy in Perl runs as a CGI on the webserver of my ISP.
It's purpose is to forward https GET and POST to a http webserver running on my PC.
With that https works without the need of any TLS ...
0
votes
0
answers
51
views
Python CGI script to run nmap
Need some guidance. New to CGI.
I would like to execute NMAP command from a (web) server. Using Apache & configured to run Python scripts as CGI. Basic linux commands & even nmap without ...
0
votes
1
answer
166
views
Set custom library path to execute a CGI file from the uhttpd
I am working on OpenWrt 23.05, to run a CGI script from the browser URL e.g. http://192.168.1.1/cgi-bin/myapp.cgi
The server is uHTTPd. My CGI file is written in C++ that needs no interpreter.
The CGI ...
0
votes
1
answer
58
views
Some browsers ignore a Location: header from a cgi script
I have a page under mysite.example.com/form that POSTs a form to a cgi script cgi.mysite.example.com/form.cgi which processes the data and then replies with Location: mysite.example.com/reply (plus a ...
1
vote
1
answer
36
views
Comment in python changes apache mimetype
I have a simple python cgi script: (my python is Python 3.9.21)
#!venv/bin/python
# " xxx "
def main():
html = """
<!DOCTYPE html>
<html>
</html>
&...
1
vote
2
answers
75
views
How to run valgrind for apache cgi module?
My CGI application written in C has memory corruption. I would like to attach valgrind while running the application. How do I do that? As apache is invoking the cgi module, I dont have an option to ...
0
votes
1
answer
155
views
Perl CGI not getting filehandle from browser upload
This is a really simple thing I'm trying to do but I can't seem to figure it out.
I have the following HTML page that should allow me to upload a spreadsheet. However it would appear that the file I ...
0
votes
1
answer
135
views
CGI issue with writing UTF8 content
I use mysql, Perl and Apache on Ubuntu.
I have the following code:
use utf8;
use CGI('-utf8'); #added based on another forum article i was reading.
use Encode;
.....
my $localcontent = JSON->new-&...
0
votes
0
answers
39
views
Can you disable output buffering in Apache to make progressive rendering work? Preferably in .htaccess
I have a cgi script that will output a "generating your output..." message followed a few seconds later with "done...". However, no matter what I do, no output reaches the browser ...
0
votes
0
answers
38
views
Python CGI script only working on certain webservers
I've been tasked with creating a website using both HTML and Python CGI. I've ran into many issues however managed to solve them all and got the HTML and CGI to work on the inbuilt python webserver ...
0
votes
1
answer
43
views
Python3: ZIP file as input to cgi script
What I'm trying to do: I want to send a ZIP file to a Python 3 CGI script over the web. Not as a form, just a payload with Content-Type application/zip that I can extract a relevant file from and ...
-1
votes
1
answer
79
views
duplicate `rel` attribute emitted by Perl 5.18.2's CGI `start_html`
In a program I'm using a rather sophisticated parameter for CGI's start_html, but that results in a duplicate rel attribute for the CSS passed via -style.
Example code:
#!/usr/bin/perl
use strict;
use ...
1
vote
1
answer
54
views
How to continue to empty template when URL data is missing in Perl Dancer2
I have this route in my Dancer app: get '/newplayer/:name/:team/:season' => sub { that is called like this: https://website.com/newplayer/Joe Smith/Tigers/Fall 2024 and collects data from the url ...
-1
votes
1
answer
154
views
I am getting an internal server error in my Perl CGI script on the line: use CGI qw(:standard); [closed]
I am trying to run an Apache web server, which would take my HTML form, process it, and would give some kind of answer.
I had problems installing CGI, configuring it, but I managed to do it. Now I am ...