Response is null when calling $.getJSON on a remote server

I have a drop down menu with a change event that makes a JQuery JSON AJAX request, which I’ve simplified for this post:

$('#id_template').change( function() {

    var data = {
        action: 'change_template'
    $.getJSON( '/ajax/index.php/section/', data, function( response, status ) {
        if( status == 'success' ) {
            $('#id_parent_section').html( response.id_parent_section );                                                        

    return false;


This AJAX request calls the following PHP function (simplified too):

    protected function change_template() {
        $this->response['id_parent_section'] = 'yes';
        echo json_encode( $this->response );

When I do change the drop menu’s value, the request seems to be successfully sent with a successful reply received (inspected it in Firebug), as the content in the “status == success” is accessed. However, the problem is the response is null.

I don’t have this problem when I’m testing on my local WAMP setup, and so have no idea why everything appears to be working fine here except the retrieval of the response array.

Any help is much appreciated.

Actually, noticed that my server’s PHP version is 5.1.6 and it was only until PHP 5.2 when the json_encode function was added. I’m hoping this explains the problem I’ve been having.