finndus
Posts: 1
Joined: Fri May 17, 2019 10:22 am

Adafruit DHT22, CGI and Apache

Fri May 17, 2019 10:39 am

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

User avatar
joan
Posts: 13912
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Adafruit DHT22, CGI and Apache

Fri May 17, 2019 11:25 am

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.

ghp
Posts: 1315
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Adafruit DHT22, CGI and Apache

Fri May 17, 2019 4:47 pm

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.

Return to “Python”