PHP Settings? PHP not receiving POST data

Viewed 23863

I’m sending a .php file POST data from a java application. The .php file is not accepting the POST data. file_get_contents(‘php://input’) is empty and $_POST is empty. I know the problem isn’t with the .php file or java application because I tested it using a different host and it worked. Is there a setting in php.ini I’m missing or a setting I need to change?

6 Answers

I was having the same problem. It turned out to be because I was prefixing my target with http . I changed it to https and it worked.

My problem was duplicate names for an input.

ex: /input name="test" type="text" / /input name="test" type="text" /

each must have a different name ex: /input name="testA" type="text" / /input name="testB" type="text" /

I had the same issue. The problem was http:// and https://

My problem appeared out of nowhere. I'm using an apache hack to hide the extension, so all I had to do is to remove .php from the file name and it worked.

/* from: */ action = "folder/filename.php"
/* to: */   action = "folder/filename"

I hope this answer helps someone else in the same situation

Related