Linked Questions
16 questions linked to/from Run Bash Command from PHP
1
vote
1
answer
2k
views
Invoke OpenSSL command via shell_exec() in PHP [duplicate]
When I execute:
openssl_decrypt(
base64_decode(file_get_contents('/path/to/file')),
'aes-256-cbc',
$key,
OPENSSL_RAW_DATA,
$iv
);
OpenSSL decrypts my file perfectly. However, when ...
0
votes
2
answers
193
views
How to make bash command and run it from PHP? [duplicate]
I have a problem, is this possible to run the bash command from PHP level?
0
votes
0
answers
139
views
How to execute bash script using php using Ec2 server [duplicate]
i have created a bash script file named as shellscript.sh.Which copy content of one file add into host file.This is working when i run this manually using command
sh shellscript.sh
I want to exicute ...
1
vote
1
answer
5k
views
Run bash script to create file in PHP
In addition to my previous question, another problem appeared and I decided to make a new question for it:
I am currently calling a php script that than runs a bash script. The php script looks like:
...
r0skar's user avatar
- 8,766
2
votes
1
answer
5k
views
Run bash script from PHP script
I am running an Apache server on CentOS and need to run some bash scripts from PHP page. Running commands which do NOT need write or execute permission from PHP file works fine (for example shell_exec(...
0
votes
2
answers
3k
views
How to run python3 on web server?
I have this python 3 program that I have problem running. When I run thought ssh using python3 4230.py it works like it should(it prints out data), but when I try to run it like python 4230.py it ...
-1
votes
2
answers
1k
views
php shell_exec can run command but not sh file
from PHP I can run commands with shell_exec but can't run bash files
I run this command
sudo ls /var/www/
and i get results
/var/www/1.sh
/var/www/2.sh
/var/www/3.sh
but when I run this ...
1
vote
3
answers
818
views
From PHP a Simple Linux Script to return "Hello World"
Okay, happy to accept down votes to get to the bottom of my problem. I am brand new to Linux but have hosted my PHP based site on a Linux cloud server and need to run a FFMPEG script to convert a ...
0
votes
3
answers
2k
views
Running a bash script using a Kubenetes Service
I am not sure how dumb or un-reasonable this question is, but we are trying to see if we can do this in any way.
I have a .bash file. And I want to run this when I invoke a url.
Let's take the url ...
0
votes
1
answer
1k
views
How to run a shell script from a html page on raspberry Pi
I'm trying to have a button on a webpage, hosted on my raspberry Pi, shutdown a QNAP via a script.
The script works when I run it from the pi command line. I've tested it. I can also see the html page ...
0
votes
1
answer
1k
views
How to run local bash script on remote server using php
I store bash script as a string in db and I need to call it on user demand. Script should be executed on remote machine from php level. I found the following topics:
Two topics about ssh connection ...
1
vote
2
answers
688
views
Run multiple Python scripts simultaneously from PHP
I know if I want to run multiple Python scripts simultaneously I can knock up a bash file that looks like this;
#!/bin/bash
python pr1.py &
python pr2.py &
python now.py &
python loader....
0
votes
0
answers
576
views
PHP script to execute a bash script
I have 3 scripts (I have removed the help_page function from the networkstats.sh script when I pasted here to save some space):
api3.php
<?php
output = shell_exec('/bin/bash /usr/share/nginx/...
0
votes
2
answers
122
views
How to get PHP to call a shell script?
I have a generate.php page
<?php
exec("./script $ip");
?>
I have verified that the the variable $ip is pulling from the URL correctly. When it redirects to this page it does not run the script. ...
0
votes
1
answer
131
views
Php webpage can not find bash file
I was following the guide written here Run Bash Command from PHP
and I have /var/www/test.php
<?php $old_path = getcwd();
chdir('/home/');
$output = shell_exec('./test.sh');
echo "<pre>$...