4

I am trying to install imagick on a VPS running Centos 5.8. Typically, it's a quick fix, but the hosting provider will not allow (permission is already denied) me to use the typical fix, which is to remount /var/tmp as executable, and then remount as non-exec.

I have already run the following commands without error (as expected, gcc is needed):

yum install php-pear gcc 
yum install ImageMagick ImageMagick-devel

After that, when I run pecl install imagick it kicks back that /var/tmp permissions were denied.

Is there a way for me to change the default location from /var/tmp to resolve this? Or is there another workaround or something I am missing? Thanks!

sofly
  • 159
  • 1
  • 5

1 Answers1

8

Set a different temporary directory on a filesystem on which you can execute binaries. For instance:

mkdir /root/tmp
pecl config-set temp_dir /root/tmp

or:

pear config-set temp_dir /root/tmp
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • 2
    I ran into a documented bug, that `pecl config-set` does not work, but `pear config-set` does, so once I got past there the setup was fairly easy. For anyone curious, I also ended up doing a wget on imagick and then compiled & made it myself to install, as `pecl` was still returning some compilation errors due to the temp folder's involvement. – sofly Aug 26 '12 at 18:37
  • If you update your answer (I can't, it's only a 4 letter edit) so that it says pear config... instead of pecl I'll mark it as correct. Also, if you compile yourself, you need to add the extension to your php.ini. – sofly Aug 26 '12 at 20:14
  • 1
    Glad it's working. Enjoy! – Michael Hampton Aug 26 '12 at 20:15