i am trying to execute a php (/var/www/server.php) in system folder from a php (/var/www/html/client.php) in web folder.
what i have done is:
in the client.php, i put exec('sudo /usr/bin/php -f /var/www/server.php',$output,$return);
in the server.php, i just put echo "OK";
in the /etc/sudoers, i put nobody ALL=(ALL) NOPASSWD: /usr/bin/php -f /var/www/server.php
it works fine like above. but i want to pass some parameters to the server.php, so i edit my client.php like exec('sudo /usr/bin/php -f /var/www/server.php '.$src_file_path.' '.$dest_file_path.'',$output,$return); and i cannot get it done and there is no error message shown in my log file.
please kindly advise on the above