I am getting error : " PhpOffice\PhpSpreadsheet\Writer\Exception ## Could not open C:\Windows\Temp\php26BD.tmp for writing."
while downloading any document in “Yii 2 Advanced”.
and and also I want to know where to put user.ini folder.
I am getting error : " PhpOffice\PhpSpreadsheet\Writer\Exception ## Could not open C:\Windows\Temp\php26BD.tmp for writing."
while downloading any document in “Yii 2 Advanced”.
and and also I want to know where to put user.ini folder.
The error message you mentioned seems to indicate a problem with file permissions or paths in a Yii2 application. Specifically, it appears that the application is trying to write to a temporary file in C:\Windows\Temp\
but is unable to do so.
Here are some steps you can take to troubleshoot and resolve this issue:
Ensure that the user account running the PHP process (e.g., IIS, Apache) has write permissions to the C:\Windows\Temp\
directory.
C:\Windows\Temp\
Directory:C:\Windows\Temp\
using File Explorer.Temp
folder and select “Properties.”Ensure that the PHP configuration is set to use the correct temporary directory.
php.ini
:php.ini
file. The path can vary depending on your PHP installation.sys_temp_dir
Directive:ini
Copiar código
sys_temp_dir = "C:\Windows\Temp\"
php.ini
, restart your web server (e.g., IIS, Apache) to apply the changes.Ensure there is enough disk space available on the drive where the temporary directory resides.