Trouble running a script under PHP, permissions
Posted: 2014-03-14T15:01:47-07:00
Hello, all,
Basic problem: I can run the Similar script just fine from the terminal as me or root, but local PHP scripts can't (running as user www). How can I enable the user www to run Similar and ImageMagick CLI commands using PHP scripts like:
such that normal user (me) doesn't lose access to Similar if I chown it to user www?
hopefully helpful:
OSX 10.9.2
Apache2
PHP 5.4.24
ImageMagick 6.8.7.7
Imagick PHP module 3.1.0RC2
I'm looking forward to using phash, but my version of ImageMagick came by way of Homebrew, so it isn't the latest version.
Thank you!
Basic problem: I can run the Similar script just fine from the terminal as me or root, but local PHP scripts can't (running as user www). How can I enable the user www to run Similar and ImageMagick CLI commands using PHP scripts like:
Code: Select all
$string_to_exec = "/usr/local/bin/similar " . $image_1_path . " " . $image_2_path . " 2>&1";
$output = shell_exec($string_to_exec);
hopefully helpful:
OSX 10.9.2
Apache2
PHP 5.4.24
ImageMagick 6.8.7.7
Imagick PHP module 3.1.0RC2
I'm looking forward to using phash, but my version of ImageMagick came by way of Homebrew, so it isn't the latest version.
Thank you!