PHP exec or AJAX problems with python matplot -
, hi guys want ajax call python script or php, fine... problem when import matplotlib.pyplot plt
in python that, script dies , when comment .pyplot works fine, how can solve this??
php
shell_exec('python ../cgi-bin/file.py 5 01/01/2017 02/05/2017');
ajax
var id = 5; var = '01/01/2017'; var = '02/05/2017'; $.ajax({ type: 'post', url: '../cgi-bin/file.py', data: {id:id, from:from, to:to}, success: function(response){ output = response; alert(output); } });
the point of using python call data database , plot values, show in website. heard using shell , giving root permission or something, i'm lost. suggestion highly appreciated!.
Comments
Post a Comment