html request to apache server with php sript via generic html

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jneumann
New user
Posts: 2
Joined: 27 Jan 2022, 12:47

html request to apache server with php sript via generic html

#1 Post by jneumann » 27 Jan 2022, 13:20

I want to send data via controller (generic http) to my internet server with apache 2. There is no problem to send data via browser e.g. "mydomain.de/sensor.php?valuename=test&value=17".
Apache access log shows
109.40.241.55 - - [27/Jan/2022:13:01:39 +0100] "GET /sensor.php?valuename=test&value=17 HTTP/1.1" 200 743 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0"
php script sensor.php works.

Now I send with ESP Easy
ctr.jpg
ctr.jpg (67.09 KiB) Viewed 7012 times
Apache access log shows
109.40.241.55 - - [27/Jan/2022:13:11:07 +0100] "GET /sensor.php?valuename=1&value=25.13 HTTP/1.1" 301 513 "-" "ESP Easy/20116/Dec 24 2021 14:39:35"
109.40.241.55 - - [27/Jan/2022:13:11:07 +0100] "GET /sensor.php?valuename=2&value=-127.00 HTTP/1.1" 301 517 "-" "ESP Easy/20116/Dec 24 2021 14:39:35"
109.40.241.55 - - [27/Jan/2022:13:11:07 +0100] "GET /sensor.php?valuename=3&value=-127.00 HTTP/1.1" 301 517 "-" "ESP Easy/20116/Dec 24 2021 14:39:35"
109.40.241.55 - - [27/Jan/2022:13:11:07 +0100] "GET /sensor.php?valuename=4&value=-127.00 HTTP/1.1" 301 517 "-" "ESP Easy/20116/Dec 24 2021 14:39:35"
(DS1804 device with 4 sensors, one enabled, http redirectet to https)
php script dont work, no php errors

on a local apache server the same works fine!
some suggestions?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: html request to apache server with php sript via generic html

#2 Post by TD-er » 27 Jan 2022, 13:36

First thing that comes to mind, is check to wait for the acknowledgement (and also on the tools->Advanced page, top of the page)

Also, your test shows a difference between floating point and integer values. Maybe that's a difference in your PHP code?

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: html request to apache server with php sript via generic html

#3 Post by Ath » 27 Jan 2022, 14:00

jneumann wrote: 27 Jan 2022, 13:20 (DS1804 device with 4 sensors, one enabled, http redirectet to https)
php script dont work, no php errors

on a local apache server the same works fine!
That redirect is pushing ESPEasy to the https:// endpoint. That's not going to work, currently (SSL/TLS support is still being worked on, though currently only for MQTT, HTTPS is planned).
/Ton (PayPal.me)

jneumann
New user
Posts: 2
Joined: 27 Jan 2022, 12:47

Re: html request to apache server with php sript via generic html

#4 Post by jneumann » 27 Jan 2022, 14:47

That redirect is pushing ESPEasy to the https:// endpoint. That's not going to work, currently (SSL/TLS support is still being worked on, though currently only for MQTT, HTTPS is planned).
That's it! No problem, i separate frontend and backend now with virtual servers and use a key to secure backend with sensor.php. It works fine, thanks forthis hint!

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests