Page 1 of 1

Adafruit DHT22, CGI and Apache

Posted: Fri May 17, 2019 10:39 am
by finndus
Hi,

I'm having trouble reading an Adafruit DHT22 sensor (temperature/humidity) through a CGI python script, when called from the webpage.
I know the backend programme works as it is logging the temperatures to a sql database, but when I try to read the sensor directly from the cgi script I get a [http:error] from the error log of apache stating
AH02429: Response header name '<!--' contains invalid characters, aborting request

I believe through trying various things that this is an adafruit library access issue through having incorrect permissions...somewhere....

If anybody has any information it will be greatly received.

Thanks

Re: Adafruit DHT22, CGI and Apache

Posted: Fri May 17, 2019 11:25 am
by joan
I would search for the '<!--' in one of the scripts you are executing. It sounds like that script is being returned as the result rather than being executed.

Re: Adafruit DHT22, CGI and Apache

Posted: Fri May 17, 2019 4:47 pm
by ghp
Instead of reading in the glass ball, I would prefer to read the CGI script. Probability for good answers increases with the number of lines of codes posted here.