在数据库中存储PHP session.upload_progress数据 [英] Storing PHP session.upload_progress data in the database

查看:178
本文介绍了在数据库中存储PHP session.upload_progress数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PHP 5.4.40中使用session_set_save_handler,我创建了一个会话处理程序,运行良好...除了上传文件时的session.upload_progress数据。



我的会话处理程序完全忽略上传进度数据,而我似乎只能得到进度数据保存在所有时间:

$ ul

  • session.save_handler =文件;会话文件保存在与session.save_path相同的路径中


  • 可能会将session.upload_progress数据保存在数据库中?



    更新:在PHP 7中,这似乎仍然是一个问题。因此,我打开了 PHP 7 Bug#74131

    解决方案

    @Pancho我切换到使用PECL uploadprogress。工作正常。必须使用mod_php而不是fastcgi / fpm。用户会话都在数据库中。

    Using session_set_save_handler in PHP 5.4.40, I have created a session handler that works well ...except for session.upload_progress data when uploading a file.

    My session handler completely ignores upload progress data, and I can only seem to get the progress data to save at all when:

    • session.save_handler=files; and
    • the session file is saved in the same path as session.save_path

    Is it possible to save session.upload_progress data in the database?

    Update: as at PHP 7 this still appears to be an issue. I have therefore opened PHP 7 Bug #74131

    解决方案

    @Pancho I switched to use PECL uploadprogress. Works fine. Have to use mod_php and not fastcgi/fpm. User sessions are all in the db.

    这篇关于在数据库中存储PHP session.upload_progress数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆