Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s) (solved)

If you are using vesta and facing this issue. You could follow these steps to solve your problem.

  1. You have to modify these two files. If the file {domain name}.com.httpd.ssl.conf don't exist, you can skip this file.
    vi /home/{user name}/conf/web/{domain name}.com.httpd.conf
    vi /home/{user name}/conf/web/{domain name}.com.httpd.ssl.conf
  2. Add "php_admin_value sys_temp_dir /home/{user name}/tmp" into these two files as below.

    <Directory /home/{user name}/web/{domain name}.com/public_html>
            AllowOverride All
            Options +Includes -Indexes +ExecCGI
            php_admin_value open_basedir /home/{user name}/web/{user name}.com/public_html:/home/{user name}/tmp
            php_admin_value sys_temp_dir /home/{user name}/tmp
            php_admin_value upload_tmp_dir /home/{user name}/tmp
            php_admin_value session.save_path /home/{user name}/tmp
  3. Save it and restart apache server.