jueves, 22 de octubre de 2015

Unable to find writable var_dir Magento

1.-Check the permission of your folder  it must be 0777,{{MAGENTO_ROOT}}/var , if it doesnt exist you must create it.

How to change permissions in Linux

REFRESH,IF IT DOESNT WORK CONTINUE TO STEP TWO

2.-Go to the {{MAGENTO_ROOT}}/app/code/core/Mage/Core/Config/Options.php

Replace this function for this one,if you are a good observer you can see that is the same code but the second line is commented.


 public function getVarDir()
    {
        $dir = $this->getDataSetDefault('var_dir', $this->getBaseDir().DS.'var');
       // $dir = isset($this->_data['var_dir']) ? $this->_data['var_dir']: $this->_data['base_dir'] . DS . self::VAR_DIRECTORY;
        if (!$this->createDirIfNotExists($dir)) {
            $dir = $this->getSysTmpDir().DS.'magento'.DS.'var';
            if (!$this->createDirIfNotExists($dir)) {
                throw new Mage_Core_Exception('Unable to find writable var_dir .2.');
            }
        }
        return $dir;
    }
3.-Try again.

No hay comentarios:

Publicar un comentario

Microsoft compra Xamarin para expandir su imperio

Microsoft  no solo quiere correr software en Windows y su adquisición hace posible su objetivo.Hoy Microsoft anuncia la compra de Xamarin u...