Tagged Questions
1
vote
1answer
57 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 ...
0
votes
1answer
104 views
Bash config files being read in contradiction to `man bash`
While trying to determine the differences between .bashrc and .bash_profile I notice that .bashrc is never read, and that .bash_profile is only read from SSH, but not from PHP. This seems to ...
2
votes
1answer
66 views
PHP Bash error suppresion
I'm using a PHP script from cli, the script calls exec() a few times. There are some minor errors sometimes, which are handled by the PHP script. I'm suppressing the errors by appending 2>/dev/null ...
1
vote
1answer
491 views
Connect to a remote mysql server with bash php or perl
What is the best and lowest resource way to connect to a remote mysql server (server1.example.com) and execute queries like
INSERT into SERVICES (user, id) ($user, $id)
from server2.example.com?
...
1
vote
5answers
493 views
Start/stop program from website
I have some users on my machine that I allow to run small Mumble voice servers. I would like for them to be able to start/stop their voice server from a website (being ran by Apache). With the current ...