When designing the interface, you need to click a button on the interface to call the python script in php,
Is a php function. the command "python/home/nessus/nessus_schedul/scan_schedul.py" can be executed on the shell command line, and the command line can also execute php, however, clicking the button on the interface is not feasible. I hope you can help me solve this problem. I am very grateful to you...
Reply to discussion (solution)
When designing the interface, you need to click a button on the interface to call the python script in php,
PHP code
$ Host_ip = $ _ GET ["IP"];
$ A = "python/home/nessus/nessus_schedul/scan_schedul.py". $ host_ip ."";
Echo $;
Exec ($ a, $ out, $ states );
Print_r ($ out );
Print_r ($ states );
?>
Is a php function. The Command [code = php] python/home/nessus/nessus_schedul/scan_schedul.py [/code] can be executed on the shell command line, and the command line can also execute php, however, clicking the button on the interface won't be able to be executed. I hope you can help me solve this problem. I am very grateful to you...
Check if php. ini disables exec.
Disable_functions
Python file permissions?
Echo $ a; whether it can be output.
Female ~
The user path used by the web server may not contain python. Try writing an absolute address in python
The py script is still in the website directory.
2L's answer is useful to me. thank you.
Does the web server user have the execution permission?