sys_get_temp_dir in shared hosting environment

后端 未结 7 1517
日久生厌
日久生厌 2021-01-31 10:27

Note: This could also fit in superuser.

I am setting up PHP 5.3.10 on a shared host with apache2 mpm itk and open_basedir in a way, that each user may not see o

7条回答
  •  温柔的废话
    2021-01-31 11:12

    It looks like you can change the value returned by sys_get_temp_dir(), I have just tried on apache 2.4 and php 5.6.27.

    Add a sys_temp_dir in the virtualhost:

    php_admin_value sys_temp_dir "/var/www/alternc/f/fser/tmp"
    

    Restart apache, and print the value in a web page using sys_get_temp_dir():

    Produces the expected output: /var/www/alternc/f/fser/tmp.

提交回复
热议问题