MacImage
Registered
im trying to create pdf files from ps files on the fly and also run some applescripts from php. i can access the command line from php with exec() to run commands, but some commands arent working for me. ive tried:
%exec("rm -rf somefile");
and that worked, but:
%exec("ps2pdf input.ps output.pdf");
isnt working. the similiar commmand from the terminal runs fine. also, im trying to run simple applescripts from php using popen(), but i have a feeling im way off. ive read the doc pages on php.net, but im still not getting it. the terminal command would be as simple as:
% osascript -e "return( 6 + 4)"
with php and popen(), im guessing it would be:
$query = "return(6 + 4)";
$cmd = "osascript";
$fp = popen($cmd, "r");
fwrite($fp, $query);
but thats just not working and the page is locking up.
any ideas?
%exec("rm -rf somefile");
and that worked, but:
%exec("ps2pdf input.ps output.pdf");
isnt working. the similiar commmand from the terminal runs fine. also, im trying to run simple applescripts from php using popen(), but i have a feeling im way off. ive read the doc pages on php.net, but im still not getting it. the terminal command would be as simple as:
% osascript -e "return( 6 + 4)"
with php and popen(), im guessing it would be:
$query = "return(6 + 4)";
$cmd = "osascript";
$fp = popen($cmd, "r");
fwrite($fp, $query);
but thats just not working and the page is locking up.
any ideas?