ajax problem

hi there

after migration to linux some parts of my program doesnt work properly

i fixed some of theme but dont know why my ajaxs does not work at all, in windows there was no error




 $(document).ready(function(){

                    $('a#add_to_card').on('click', function(event){

                        event.preventDefault();

                        $item_id = $(this).data('item_id');

                        $.ajax({

                            type: 'POST',

                            dataType: 'json',

                            url: '<?php echo Yii::$app->urlManager->createUrl(["master-category/add_to_card_by_ajax"]); ?>',

                            data: {'item_id': $item_id},

                            success: function(data){

                                $('li#card a').text('سبد خرید' + ' '  + data['items_count'] + ' ' + 'کالا' );

                            }

                        });

                    });

                });



its confusing

i have error 500 in another page with working ajax, but success function in ajax not running