Tag: Apache

How to get data from a web page using GET and POST methods in a Python script on Windows

Python programs and scripts can make requests to and receive data from websites and web services using the GET and POST methods (as well as other HTTP methods: PUT, PATCH and DELETE). But what if you want to pass data from a web page to a Python script? This can be done in several ways. How to get data from...

How to get data from a web page using GET and POST methods in a Python script

Python programs and scripts can make requests to and receive data from websites and web services using the GET and POST methods (as well as other HTTP methods: PUT, PATCH and DELETE). But what if you want to pass data from a web page to a Python script? This can be done in several ways. How to get data from...

How to install Python as a CGI module in Apache on Linux

Table of contents 1. How to run a Python script on a web server 2. How to set up Python as a CGI module in Apache on Debian (Ubuntu, Linux Mint, Kali Linux) 2.1 Setting up Python CGI for a single directory 2.2 Setting up Python CGI for the entire web server 3. How to set up Python as a...

How to set up Python as a CGI module in Apache on Arch Linux (Manjaro, BlackArch)

Setting up Python CGI for a single directory Create a directory /srv/http/cgi-bin/ - this is where the Python scripts will be located: sudo mkdir /srv/http/cgi-bin/ Open the /etc/httpd/conf/httpd.conf file – the web server configuration file: sudo gedit /etc/httpd/conf/httpd.conf Find a group of lines: <Directory "/srv/http/cgi-bin"> AllowOverride None Options None Require all granted </Directory> And replace it with: <Directory "/srv/http/cgi-bin"> AllowOverride...

How to set up Python as a CGI module in Apache on Debian (Ubuntu, Linux Mint)

Setting up Python CGI for a single directory Run the command to enable the CGI module: sudo a2enmod cgi Restart the web server for the changes to take effect: sudo systemctl restart apache2 Create file /usr/lib/cgi-bin/test.py: sudo gedit /usr/lib/cgi-bin/test.py Copy the following content to this file: #!/usr/bin/python3 print ("Content-type: text/html") print ("") print ("") print ("<html><head>") print ("") print ("</head><body>")...

Error “No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.1-fpm.sock (*:80) failed” (SOLVED)

Debian and derivative distributions (Ubuntu, Linux Mint, Kali Linux, and many others) may experience a “FCGI: attempt to connect to Unix domain socket /run/php/php8.1-fpm.sock (*:80) failed” error when migrating from PHP 8.1 to PHP 8.2. Apache web server log sudo tail /var/log/apache2/error.log contains the following error messages: [Sun Jan 29 03:05:45.213609 2023] [proxy:error] [pid 1313500] (2)No such file or directory:...

phpMyAdmin error “Error: Undefined constant “SODIUM_CRYPTO_SECRETBOX_KEYBYTES”” (SOLVED)

On Arch Linux, when trying to use the phpMyAdmin 5.3 pre-release, I encountered an error: Error: Undefined constant "SODIUM_CRYPTO_SECRETBOX_KEYBYTES" Checking in Debian showed that there is no such problem with phpMyAdmin 5.3. The reason for the error is that sodium support is not enabled. How to enable sodium on Arch Linux (Manjaro, BlackArch) To enable sodium support in Arch Linux...

How to show all errors in PHP 8

How to display all errors in PHP 8 By default, PHP 8 disables showing errors, so if there is a problem while executing a PHP script, nothing will be displayed on the screen. If an error in the program occurred before the output of the HTML code, then you will see a white screen of the web browser. Where is...

Apache window appears and immediately disappears (SOLVED)

When I click on httpd.exe, a black window flickers and then disappears Apache (httpd) is a command line utility. Strictly speaking, this is a service that is designed to run in the background without a graphical interface. That is, Apache does not have a graphical interface in the form of a familiar window. Therefore, Windows users may feel that the...

Configuring Apache Web Server to Run Perl Programs on Windows

Perl scripts can be run in the Apache environment in the same way as PHP scripts. To do this, you need to make a small setting. I installed the web server according to this instruction, if you installed according to a different instruction, then edit the paths to suit your values. 1. Installing Perl on Windows Download Perl for Windows...
Loading...
X