I want to run a linux command via PHP exec() and my first command below executing in background at Ubuntu Server 22.04 perfectly -
<?php
$cmd = "java -jar /var/www/html/selenium-drivers/selenium-server-4.14.1.jar hub";
exec($cmd . " > /dev/null &");
?>
But the very similar of my second command is not executing.
<?php
$cmd = "java -jar /var/www/html/selenium-drivers/selenium-server-4.14.1.jar node --port 5555 --selenium-manager true";
exec($cmd . " > /dev/null &");
?>
I am unable to find out the reason why not working. Anybody please help?
Checked all necessay permissions of PHP and there is not issue of permissions. First command executing perfectly but the second is not.
$cmd = "nohup java -jar /var/www/html/selenium-drivers/selenium-server-4.14.1.jar node --port 5555 --selenium-manager true > /dev/null 2>&1 &"; exec($cmd);nodeargument mean for the Java program?nodeparameter says "During startup time, the Node will detect the available drivers that it can use from the SystemPATH", so that's my best guess—helpor similar to see if you can specify a cache folder that you can control.