【】
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?
-
Answer # 1
Related articles
- unable to crud from aws mysql web server (apache) to db server
- python - unable to extract img and alt contents from html
- error when setting apache2 to https on raspberrypi
- unable to extract the url to the output destination with ruby "extract line containing url"
- about apache startup error (httpdservice: failed with result'protocol')
- httpd-sslconf error with apache 24 installation
- python - unable to resolve the error statement
- i have a question about perl hash error in apache 24
- python - unable to extract url when scraping from news site (yahoo news)
- apache cannot start "ah00015: unable to open logs"
- apache - selenium called 500 error from django
- java - unable to resolve jsp file error in maven project
- java - error: incompatible type: unable to convert string [] to string
- unable to resolve settingjson error when using vim extension with vscode
- "sqlite3operationalerror: unable to open database file" error in python
- unable to open folder after installing apache tomcat
- ruby - [rails] unable to resolve "name error in affiliates controller # show" error
- postgresql - unable to resolve error in db: create
- unable to boot with mysql error number 28 means'no space left on device'!
- php - unable to connect to apache
- linux - it was cool in x window, but i got an error when i ran it from ssh usb qr code reader
- python 3x - valueerror: not enough values to unpack (expected 3, got 2)
- tensorflow 230 cannot be imported when using apache
- apache - python: django's runserver doesn't start properly
- python - i want to store data in tuples every time i reload and output the latest 5
- python - failed to start system security services daemon appears when starting centos8
- python 3x - i want to specify the number of packets sent and received with the raspberry pi ping command
- python 3x - i want to output the python3 ping result to csv
- python 3x - please teach about the exchange of information with qthead
- when using apache external media as the document root, it becomes 403 forbidden
It looks like it, but isn't it cured after setting the locale with
raspi-config
and rebooting?(Added)
The environment variables of apache are set in the
/etc/apache2/envvars
file, so edit this and restart apache2.