Can't execute commands via PHP and web server -


i want run at command in php. here file:

<?php # at.php     exec("echo ls | /usr/bin/at 02:00");     $command = '/usr/bin/atq';     exec($command, $output);     print_r($output); 

if execute cli: php at.php, works well, doesn't work via web server in browser : http://localhost/at.php

i use ubuntu 14.04 , php 5.5 , checked nginx , apache2.

in linux try system command

http://php.net/manual/en/function.system.php

# at.php     $last_line = system("ls | /usr/bin/at 02:00", $retval);     print_r( $retval) 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -