Closed piotrekkaminski closed 6 years ago
From @dmanners on January 3, 2018 8:54
This has been fixed in 2.3-develop with the pull request https://github.com/magento/magento2/pull/12376
This is already fixing in 2.3-develop.
Is this going to be backported to 2.1?
From @jean-bernard-valentaten on December 28, 2017 10:34
Importing tablerates via backend fails with an error message like 'The file "/tmp/var/www/dist/var/upload/phpi1qs6p" doesn't exist' when PHP setting
upload_tmp_dir
is set to anything that does not relate to settingsys_temp_dir
. This is due to the first line of the private method\Magento\OfflineShipping\Model\ResourceModel\Carrier\Tablerate::getCsvFile()
in which a directory reader forDirectoryList::SYS_TMP
is requsted.Preconditions
upload_tmp_dir
is set to a folder that does not relate to the folder defined bysys_temp_dir
Steps to reproduce
upload_tmp_dir
to an existing folder, e.g./var/php/upload
sys_temp_dir
unconfigured such that PHP defaults it, e.g./tmp
Expected result
Actual result
When looking at
\Magento\OfflineShipping\Model\ResourceModel\Carrier\Tablerate::getCsvFile()
you'll notice the first line statingThis results in the sys_temp_dir being prepended to the actual file path when executing the line
Copied from original issue: magento/magento2#12904