By the problem I have, when I create chat and I put the code of send message I post the data like this: 

```
function sendMessage()
{
    var text = $('#text').val();

    if (text.length > 0)
    {
        $.post('http://localhost/chats/public/sendMessage', {text: text, username: username}, function()
        {
            $('#chat-window').append('<br><div style="text-align: right">'+text+'</div><br>');
            $('#text').val('');
            notTyping();
        });
    } 

```

I think that the problem is for posting data by path.