sys_get_temp_dir in shared hosting environment

后端 未结 7 1515
日久生厌
日久生厌 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():

    <?php 
    echo sys_get_temp_dir () ;
    

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

    0 讨论(0)
提交回复
热议问题