executing commands with pipe operator in safe mode
Posted: Thu Jul 10, 2003 9:24 pm
hi i can't seem to get php 4.2.2 to execute commands with the pipe operator in safe mode. i am issuing this command
passthru("jpegtopnm picture.jpg | pnmscale .5 | pnmtojpeg >picture_small.jpg");
i can't seem to get php to pipe the output of one command to the other.
also, the > doesn't work...for instance
passthru("jpegtopnm picture.jpg > picture.pnm");
however,
passthru("jpegtopnm picture.jpg");
does write the pnm binary text to the screen.
someone please help me out.
i also have jpegtopnm, pnmtojpeg, and pnmscale in my safe mode exec dir.
helton
passthru("jpegtopnm picture.jpg | pnmscale .5 | pnmtojpeg >picture_small.jpg");
i can't seem to get php to pipe the output of one command to the other.
also, the > doesn't work...for instance
passthru("jpegtopnm picture.jpg > picture.pnm");
however,
passthru("jpegtopnm picture.jpg");
does write the pnm binary text to the screen.
someone please help me out.
i also have jpegtopnm, pnmtojpeg, and pnmscale in my safe mode exec dir.
helton