1
vote
3answers
273 views

php shell_exec() permission on Linux Ubuntu

I'm developing a php application using Linux server. My problem is executing shell_exec() to call some exe file is not work(actually not exe, it's kind of linux executable file) echo ...
1
vote
1answer
51 views

Program acting differently depending on user

I am trying to control an RC transmitter from a PHP site. The command works fine as user "xbian" in the command line: sudo /home/xbian/433Utils/RPi_utils/codesend 34832404 for example, and it works ...
1
vote
2answers
204 views

Using sudoers to allow php to run command

I am trying to get my php page to run this command: shell_exec("sudo /home/xbian/433Utils/RPi_utils/codesend {$num}"); So I added this entry to my sudoers file with visudo: www-data ALL=NOPASSWD: ...
0
votes
1answer
95 views

How to pass wildcards in command line [closed]

So this works: foo -a -b -c "path/file.ext" And this too if I want to pass all files from directory: foo -a -b -c path/* But if I add the quotes foo -a -b -c "path/*" It doesn't work anymore: ...
1
vote
1answer
148 views

Delete key doesn't work properly in PHP interactive shell

In the interactive shell oh PHP Delete key is not working and produce ~ instead. Anyone know how to get this key to work? I am using Ubuntu 13.04 if this does matter.
2
votes
2answers
263 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
7k 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
532 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
6k 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
341 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 ...