5,167 questions
-4
votes
0
answers
59
views
How to create a custom error page from CGI avoiding Apache to append its own message? [closed]
I wrote a CGI script in Perl that handles a specific application completely and triggers a redirect to an error page for some errors.
The error page when being sent also sets the HTTP status code as ...
0
votes
1
answer
98
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 ...
1
vote
1
answer
35
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>
&...
0
votes
1
answer
151
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
0
answers
33
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
37
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 ...
-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
votes
1
answer
151
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 ...
0
votes
1
answer
161
views
Run a CGI application on windows server 2022 via POST request - how?
I'm not a windows server pro but searching the net did not give recent answers.
Here is the setup: I have a Windows server 2022 machine. I'd like to trigger a program there by a web post request. The ...
0
votes
0
answers
39
views
Error while running C++ CGI file on the Apache2 server
I created a main.cpp which is converted to song_stack.cgi and is stored in /opt/homebrew/var/www/cgi-bin
the httpd.conf file is stored in /opt/homebrew/etc/httpd/httpd.conf
I created an index.html and ...
0
votes
2
answers
68
views
Python flask adding additional new lines to file while saving
While writing html textarea content in a file, python flask is adding additional new lines in the file.
There is no issue while reading the content on textarea.
Initial file content:
line1
Line2
Line ...
0
votes
0
answers
56
views
Using Apache to Proxy HTTP Requests to HTTPS for Legacy Win32 EXE without SSL Support
I have a Win32 exe program installed on hundreds of clients. This application makes an HTTP API call to retrieve information about an address based on the provided ZIP code. The exe calls an address ...
0
votes
1
answer
192
views
Python in web. Cgi, flask and py-script
I am working on my pet-project which is supposed to take user's data from web page and show the result (calculated on python). I just do not know how to connect my python code with html+css+js page.
I ...
0
votes
1
answer
86
views
newlines containing text to SQLite in windows console
Running batch files powered CGI web site with SQLite database, storing text with newlines requirement newly arise.
I am able to store text with newlines into a database by:
sqlite3.exe "\work\...
0
votes
2
answers
726
views
I get a 404 error while trying to open my python file using apache cgi
I'm new to python backend development, I was trying to set up an apache to use cgi-bin and a simple python file.
This is my apache2.conf (I"ve added the following):
<Directory "/var/www/...
1
vote
0
answers
294
views
What Python code for replacing cgi.FieldStorage for reading contents of uploaded files?
Since the python cgi module will soon be removed, I need a way to capture file contents uploaded through an HTML form that looks like this:
<form id="uploadfile" method="post" ...
0
votes
1
answer
48
views
Sending uploaded file from JS to Python CGI always results in ampty dictionary
I have an HTML form that has a file input element. When submitting the form, a JS function is executed which checks if the uploaded file is a PDF file and is less than 10MB. All of this works ...
2
votes
2
answers
580
views
CGI::param called in list context and Undefined subroutine &CGI::Plus::randword called errors
I am trying to dockerize a web application which is in perl and at the end it connects with MariaDB via Apache.
I already have a database setup. My containers are running but the problem is with perl ...
0
votes
1
answer
238
views
Got [cgi:error] AH01215: (8)Exec format error: exec of '/cgi-bin/echarts.js' failed
Perl script use CGI to generate html with echarts.js. Error information like below:
[Fri Aug 25 10:07:17.488252 2023] [cgi:error] [pid xx] [client xxxx] AH01215: (8)Exec format error: exec of '/cgi-...
1
vote
2
answers
488
views
Invisible files in /tmp directory
I have a CGI::Session script that writes the session id to the /tmp file. The script doesn't error out, but when I check the /tmp directory, I don't find the cgisess* file. This is the permission of /...
-3
votes
1
answer
85
views
Why my php and python files are not running in mac [duplicate]
I have installed php and python in my mac and made the changes required in httpd.conf file as well.
I have restarted the apache web server as well.
Here is my php webpage
Here is my python webpage
...
0
votes
1
answer
135
views
chpasswd.cgi - change password on web won't work with more than 8 chars
Good night!
I'm using a chpasswd.cgi to change password via web, the problem is that when I change the password to 123456789 it won't work. I'm migrating a proxy server to a new one, and I have more ...
1
vote
1
answer
191
views
Perl script not displaying properly within Apache web server (Mac)
So I have a Perl script that I want to run within an Apache web server and everything seems to be working correctly except for the formatting. The server displays the Perl script as plain text rather ...
3
votes
0
answers
3k
views
Since the CGI module is slated to be deprecated in Python 3.13, what is a good substitution for cgi.FieldStorage?
I tried to use multipart, email.message, html.parse and requests but none seem to be doing what I need, which is getting the fields of an HTML form. Any suggestions?
1
vote
0
answers
47
views
Display Warning Message if Any Form Fields are Blank - Python/CGI/HTML
I have a small application that displays a form with four fields. I'm trying to build in some validation so that a warning message is displayed if one or all of the fields are blank when a user clicks ...