Skip to content
Advertisement

AWS EC2 micro instance, PHP recieving en empy $_POST array

I’m trying to set up an AWS-EC2 instance which responces with data depending on the stuff I send. My problem is that the $_POST array is completely empty and I have no idea why ( var_dump($_POST) ).

“It worked on my machine” (localhost and XAMPP), so I’m guessing I miss a configuration or something. I secured that I’m not pointing to my localhost.
I set it up this week, so I should have the latest version of the apache2 server and PHP 7.2 installed.

I can echo some other stuff, so the site is responding….
Has someone a clue what I’m missing?

Thanks in advance.

Advertisement

Answer

The problem was that I configured my apache to redirect http to https. My test form pointed to http and the redirect somehow lost all data. after I pointed my test form to https, it workt how it’s supposed to.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement