I want to start shellinabox on centos through a php api.
When the user hits the api, shellinaboxd -p 'portno'
command should get executed and shellinabox should start on the particular port number.
But this does not happen, instead this error comes Error :
Failed to find any available port [on tail -f /var/log/httpd/error_log] The code below runs correctly on ubuntu but not on centos.
Consider rest all things working fine.
$app->get('/test', function() {
exec('shellinaboxd -p '.$port);
});
Executing:
shellinaboxd -p 'someport'
on bash also works fine.
I have php5.5 and apache2 installed on my system.