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:
chdir('/home/');
$output = shell_exec('./do.sh');
echo "<pre>$output</pre>";
The do.sh contains:
#! /bin/bash
echo 12;
dd if=/dev/urandom of=test.test bs=1048576 count=2
The problem is following:
When I call ./do.sh
from the terminal everything works fine: test.test is created and the ouput is 12
However, when I call it from my php file, the output is 12
aswell, but no file is being created. Since I know almost nothing about bash scripting, I have no idea why this is happening...