0

I am developing a simple project with an ARDUINO MEGA with a ESP8266. The ARDUINO gets some data, and send to a web, and from the web to a database. The system works perfectly when the web-database were hosted in:

https://www.000webhost.com/

I was forced to move the web to:

https://www.hostinger.es/

, … and now the system does not work.

The web is ok, the database is ok, both work together ok. When I send data to the web, the web send perfectly to the database, … just writing in the browser:

https://aircleaner.es/TX.php?id=1&TE=500.00&TS=20.00&TI=20&REG=0&MOS=0&TEC=0&HEC=0&WEC=0&DENEC=0&HEEC=0

Now (after moving the web) the data sent by ARDUINO do not arrive to thw web. The ARDUINO connect perfectly to the WIFI.

Serial1.print("AT\r\n");
Serial1.print("AT+RST\r\n");
Serial1.print("AT+CWMODE=1\r\n");
Serial1.print("AT+CWJAP=\"wifi\",\"password\"\r\n");
Serial1.print("AT+CIPMUX=1\r\n");

After that, it connects to the WEB with the following command:

Serial1.print("AT+CIPSTART=0,\"TCP\",\"aircleaner.es\",80\r\n");

Serial1 answer “OK”

I send the package length:

Serial1.print("AT+CIPSEND=0,");
Serial1.print(payload.length());

Serial1 answer “OK”

Then I send the package:

for(int i=0; i< payload.length(); i++){
    Serial1.print(payload[i]);
}

payload variable is: "GET /TX.php?id=1&TE=500.00&TS=20.00&TI=20&REG=0&MOS=0&TEC=0&HEC=0&WEC=0&DENEC=0&HEEC=0 HTTP/1.1 Host: aircleaner.es Connection: close"

Serial1 answer “Recv 139 bytes”

Everything seems that the connection was ok, and also the data were sent.

But the database did not get the data. It works when the web was in 000webhost.com, … but not in hostinger.es The people from hostinger can not help me.

Any help?

I tried to import the web-database from 00webhost to hostinger automatically. The first time I did manually I tried to use different connection ports (originally was 80)

3
  • does http (port 80) work in browser? your sketch doesn't use secure connection (https on port 443) Commented May 6, 2024 at 16:28
  • I would do the following. 1) Check the raw access logs, to see if anything was accessing the TX.php script. Ideally, you would see your Arduino calling the script here. 2) Check the PHP error logs, and see if there are any fatal errors, warnings, notices, etc. Perhaps the problem is within the script - maybe the PHP version is different on your new host, or the server settings are not the same (most likely), and your PHP script is breaking. Commented May 6, 2024 at 20:27
  • If you copy and paste the url to your browser and send the request to the sever, you get this, so fix your server first. Commented May 7, 2024 at 0:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.