linux - pngquant doesn't work with php -


i have installed pngquant on mac , on linux running centos 7. on both machines can use command line, if won't work when same command run in php.

linux commands tried:

yum install pngquant 

says succesfully installed pngquant

which pngquant 

returns /usr/bin/pngquant

my php file code ptst.php:

<?php echo "start";  echo $get_compress = exec("find . -name '*.png' -exec /usr/bin/pngquant -ext .png -force 256 {} \;"); echo "end"; ?> 

i have 1 png file in current folder: image_5.png. has permissions: -rwxrwxrw-, , in same folder ptst.php

upon using ls -la can see file size hasn't changed. echoed outout startend.

if run same code in terminal, file size changes 1/3 of it's previous size.

what doing wrong? there issues don't know about.

edit: new command:

echo $get_compress = exec("find . -name '*.png' -exec /usr/bin/pngquant --ext .png --force 256 {} \; 2>&1", $output); print_r($output); 

output bit more illustrative;

'./image_5.png.tmp' writingarray ( [0] => error: cannot open './image_5.png.tmp' writing ) 


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -