Home>

【】
I am new to the program and use only Python3.
I am running python as cgi on apache2 on a rasp pie.
The program works without any problems, so there is no problem at present,
I am interested in the error log of apache2.


[Environment]
Raspberry Pi3 Model B (Raspbian Jessie)
Python 3.5.3
Apache2 2.4.25


[Error message and action taken]
If i look at the error log of apache2 after running cgi, the following words will appear.

  

(1) There is a problem with the character encoding of the quoted text file name, and it can be solved by modifying the environment variable LC_ALL.
  (2) The result cannot be extracted.

error_log
[Sat Nov 30 13: 47: 10.510945 2019] [cgi: error] [pid 834: tid 1894732848] [client 192.168.11.15:50152] AH01215: WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this .: /media/pi/cgi-bin/test.py, referer: http://192.168.11.9:8080/index.html
[Sat Nov 30 13: 47: 14.369682 2019] [cgi: error] [pid 834: tid 1894732848] [client 192.168.11.15:50152] AH01215: WARNING: Unable to extract result entry:/media/pi/cgi-bin/test.py, referer: http://192.168.11.9:8080/index.html

Therefore, for (1), we executed the following on a terminal on Raspai.

pi @ raspberrypi: ~ $export LC_ALL = en_US.UTF-8
pi @ raspberrypi: ~ $printenv LC_ALL
ja_JP.UTF-8


After that, even if you run cgi, the apache error log appears in the same way.


[Question]
A) How should I set LC_ALL to prevent the error (1) from occurring?
B) What does the error indicated by (2) mean?