Change pecl's temp directory? (installation issue)

5,968

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:
5,968

Related videos on Youtube

sofly
Author by

sofly

Updated on September 18, 2022

Comments

  • sofly
    sofly almost 2 years

    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
    sofly almost 12 years
    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.
  • Michael Hampton
    Michael Hampton almost 12 years
    Glad it's working. Enjoy!