Executing command line from PHP Use shell_exec() or exec(). shell_exec() is typically more useful, because it returns all of the output, whereas exec() only retuns a single line. Check shell_exec() exists You can find its been disabled in php.ini for instance. Running a script with shell_exec()