I tried this function from php with :
exec("gcc testC.c -o runner.out 2>&1",$output,$status);
but when I print $output I get this error :(:
gcc: error trying to exec 'cc1': execvp: No such file or directory
If I run
exec("/usr/bin/gcc testing/pruebaC.c -o testing/frommm.out 2>&1",$output,$status);
I get that
collect2: fatal error: cannot find 'ld'
My user :
groups vagrant
vagrant : vagrant root adm cdrom sudo dip www-data plugdev lpadmin sambashare
My gcc directory
/usr/bin$ ls -l gcc
lrwxrwxrwx 1 root vagrant 7 Apr 7 2014 gcc -> gcc-4.8
If I run from terminal all work, I can compile and execute but from PHP I cant :(