magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

install.log can not be created with open_basedir restriction

Open pavelnovitsky opened this issue 11 years ago • 3 comments

Please, see these comments https://github.com/magento/magento2/issues/791#issuecomment-66431735 https://github.com/magento/magento2/issues/791#issuecomment-66433913

Virtual hosts with defined open_basedir settings

<Virtualhost>
php_admin_value open_basedir /home/user
php_admin_value upload_tmp_dir /home/user/tmp
php_admin_value session.save_path /home/user/tmp
</Virtualhost>

do not work correctly with sys_get_temp_dir() function

    //WebLogger
    public function __construct()
    {
        $this->logFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $this->logFile;
    }

$this->logFile will be always /tmp/install.log and this leads PHP Warning: fopen(): open_basedir restriction in effect. File(/tmp/install.log) is not within the allowed path(s)

This issue is connected with my previous issue https://github.com/magento/magento2/issues/792

pavelnovitsky avatar Dec 10 '14 10:12 pavelnovitsky

A related problem with the name of "install.log" -- #673

antonmakarenko avatar Dec 15 '14 22:12 antonmakarenko

@pavelnovitsky Thanks for the report. We are investigating the issue.

antonmakarenko avatar Dec 15 '14 22:12 antonmakarenko

We have committed a fix for this issue. Please reopen if the fix doesn't work for you.

muasir avatar Jan 23 '15 21:01 muasir