Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

HOWTO: fix sys_get_temp_dir returns /tmp

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
ViperBit
Posts: 1
Joined: Thu Jul 11, 2019 3:25 pm

Os: Ubuntu 17x
Web: apache + nginx
HOWTO: fix sys_get_temp_dir returns /tmp
  • Quote

Post by ViperBit » Thu Jul 11, 2019 3:44 pm

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

Code: Select all

php_admin_value sys_temp_dir %home%/%user%/tmp
in Directory section of templates in /usr/local/vesta/data/templates/web/apache2 (for ex default.tpl)

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>
...
good luck.
Top


Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password