HOWTO: fix sys_get_temp_dir returns /tmp
HOWTO: fix sys_get_temp_dir returns /tmp
hi,
when u use vestacp u cant use sys_get_temp_dir () in php because always it returns /tmp that u cant rely on, especially for creating temp file so u must change it in apache templates.
add
in Directory section of templates in /usr/local/vesta/data/templates/web/apache2 (for ex default.tpl)
good luck.
when u use vestacp u cant use sys_get_temp_dir () in php because always it returns /tmp that u cant rely on, especially for creating temp file so u must change it in apache templates.
add
Code: Select all
php_admin_value sys_temp_dir %home%/%user%/tmp
Code: Select all
...
<Directory %docroot%>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir %docroot%:%home%/%user%/tmp
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value session.save_path %home%/%user%/tmp
php_admin_value sys_temp_dir %home%/%user%/tmp
</Directory>
...