inexplicable PHP behaviour(!?)
Posted on 2008-06-12
i have a snippit of PHP code which refuses to do the biz and i cannot for the life of me see why...
there is a simple (bespoke) binary ('mybin') which has 755 permissions and which maps an input string to stdout, eg: % echo "my_string" | mybin > outfile ... which works fine as a shell cmd...
now in my php script i coded both:
exec("echo $string_var | mybin > outfile");
exec("cat text.file | mybin > outfile");
... but each of these produce empty output files... i have plenty other 'exec's in my script which are fine... the darn' thing just seems to want to ignore 'mybin' (which was built on the host m/c)... i even tried restarting the apache httpds... ...no comprendo...