Tagged Questions
1
vote
1answer
59 views
How to open process substituted file from php?
Here's what I tried to do myself:
$ type 1.sh
#!/bin/bash -eu
php -r 'var_dump(file_get_contents($_SERVER["argv"][1]));' -- <(echo 1)
$ ./1.sh
PHP Warning: file_get_contents(/dev/fd/63): failed ...
3
votes
2answers
3k views
Execute shell script from php, as root user?
Need to execute the following line from PHP:
$res = shell_exec('sudo sh /home/nicklas/cronjobs/make_account.sh
username password');
The problem is nothing happens on execution. If i try to ...
-4
votes
1answer
319 views
Changing IP address of Apache server using PHP statically
I want to statically assign the IP address of my Arch linux using php. I want to change the IP by using netmask,interface,broadcast,address & gateway. The user puts up the values into a html page. ...
2
votes
2answers
2k views
Executing a shell command from PHP with shell_exec
Included in my thesis is to create an administration interface, in which an
administrator can approve users whom have asked for access to use
OpenNebula.
Upon approval the users should be added to ...
1
vote
1answer
282 views
Execute file in its native directory with shell script
I'm executing a php file from the php-cli with a shell script. One of the php files creates a file named available_data during the course of its execution. The problem is that the php file needs to ...