PhP Upload progress in PhP 5.4 is not working. Session variables not set

前端 未结 1 458
盖世英雄少女心
盖世英雄少女心 2020-12-03 23:27

I have a problem with PhP File Upload progress monitor at the very start.

First, here are the relevant PhP.ini settings (Directive, Local Value and Master Value):

相关标签:
1条回答
  • 2020-12-03 23:58

    There could be some issues, I have listed down few of them.

    • The web server's request buffering has to be disabled for this to work properly, else PHP may see the file upload only once fully uploaded.
    • This feature doesn't work, when your webserver is running PHP via FastCGI.
    • Don't forget, that the session has to be initialized before the form is generated, otherwise you will get no information in the session.
    • It won't work in PHP 5.3 or earlier.
    • Note that if you run that code and you print out the content of $_SESSSION[$key] you get an empty array due that session.upload_progress.cleanup is on by default and it cleans the progress information as soon as all POST data has been read. Set it to Off or 0 to see the content of $_SESSION[$key].

    This can help you to track your progress bar http://pecl.php.net/package/uploadprogress

    I hope this will help you to dig out the problem.

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