Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.