The most likely explanation is that the user account of your web server doesn't have write access to the directory. You can determine the account name by running whoami from within php.
exec('whoami', $output);
echo $output[0];
I don't know exactly what output you're going to get from that, but let's say it's www-data which is what I see on Ubuntu.
Now, if you look at the permissions of the web root directory, you'll probably find that it's owned by another account, maybe root, and the permissions are rwxr.xr.x so only root has access.
One way to give www-data write access is to make it the owner:
chown www-data .
Alternatively you can set the group to www-data and make sure that group has write access.
chgrp www-data .
chmod 775 .
Worst case you can give everybody write access, but I wouldn't recommend this unless nothing else works.
chmod 777 .
Ideally, you should really create a separate directory with write access, and limit any output to there rather than changing the permissions on the web root directory. But you can start with the root first and make sure this really is the problem before you go to too much effort.
hello.canda.exec()'s optional arguments and return value, where errors would normally be reported. You're also discarding stderr.