Does not work the POST method in PHP, what is he outdated? How are they gonna use?

Hello, the POST method is not working!
In General, the simplest code
file index.php
<form action="action.php" method="post">
 <p>Your name: <input type="text" name="name"></p>
 <p>Your age: <input type="text" name="age"></p>
 <p><input type="submit" name="reg" value="login"></p>
</form>


file action.php

Hello, <?php echo htmlspecialchars($_POST['name']); ?>.
You <?php echo (int)$_POST['age']; ?> years.<br>
<?php
print_r($_POST);
?>

What I just already did, furthermore what to do to POST earned
Like in the POST, nothing is transferred
Because this code displays an empty array
<?php
print_r($_POST);
?>

here
Array ( )
and still writes a bunch of very type
Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0

Warning: Cannot modify header information - headers already sent in Unknown on line 0
Hello, 
Notice: Undefined index: name in D:\www\Apache\web\test\action.php on line 1
. You 
Notice: Undefined index: age in D:\www\Apache\web\test\action.php on line 2
0 years.
Array ( ) 
Notice: Undefined index: sudmit in D:\www\Apache\web\test\action.php on line 8

Worn out already with him. How to make prompt?
July 2nd 19 at 13:24
3 answers
July 2nd 19 at 13:26
you can't just pick up and read the error
It is possible, but I do not understand something, the fact that in another version of php I just have the error Notice: Undefined index: name - chelsie_Emmerich commented on July 2nd 19 at 13:29
everywhere where he has an array POST how to fix it? I have realized that it's out of date, but as a new transfer data? - chelsie_Emmerich commented on July 2nd 19 at 13:32
July 2nd 19 at 13:28
To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead.
It's still not working - chelsie_Emmerich commented on July 2nd 19 at 13:31
July 2nd 19 at 13:30
I think I almost figured out, set up a virtual machine, there's Denver, there's php 5.3 and works there, and I have locally is php 5.6.27, think this is the problem or something in the php settings.ini

Find more questions by tags PHPWeb Development