• Resolved Kreeger

    (@kreeger)


    Hi there,

    When I add a new redirection, I get this error.
    How to fix it please?

    Plugin: 3.4
    WordPress: 4.9.7 (single)
    PHP: 5.6.32
    Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0
    JavaScript: https://www.PROJECT.local/wp-content/plugins/redirection/redirection.js
    REST API: https://www.PROJECT.local/wp-json/
    
    Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    Action: redirection/v1/redirect/ POST
    Params: {"id":0,"url":"/agenda/","title":"","regex":false,"match_type":"url","action_type":"url","position":0,"group_id":1,"action_code":301,"action_data":{"url":"/category/news/agenda/"}}
    Code: 200 OK
    Raw: <br />
    <b>Deprecated</b>:  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 <b>Unknown</b> on line <b>0</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>Unknown</b> on line <b>0</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1274</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1248</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api.php</b> on line <b>544</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api.php</b> on line <b>545</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api.php</b> on line <b>546</b><br />
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent in <b>/Applications/MAMP/htdocs/git/PROJECT/wp-includes/rest-api.php</b> on line <b>547</b><br />
    {"items":[{"id":2,"url":"\/agenda\/","action_code":301,"action_type":"url","action_data":{"url":"\/category\/news\/agenda\/"},"match_type":"url","title":"","hits":0,"regex":false,"group_id":1,"position":1,"last_access":"-","enabled":true},{"id":1,"url":"\/actualites\/","action_code":301,"action_type":"url","action_data":{"url":"\/category\/news\/actualites\/"},"match_type":"url","title":"","hits":0,"regex":false,"group_id":1,"position":0,"last_access":"-","enabled":true}],"total":2}
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Godley

    (@johnny5)

    The problem is shown on the first line:

    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.

    Also, you shouldn’t have errors displayed on a production site and this option should be disabled in your PHP config.

    Thread Starter Kreeger

    (@kreeger)

    I know the problem is shown on this line.

    But ok, I will contact my colleague. Thanks you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and …’ is closed to new replies.