dqbr37828 2016-03-11 16:02
浏览 29

使用zend框架2进行会话上载进度

I am trying to implement session upload with zf2, but it fails with "No upload in progress".

I am using ZfcUser and HtSession.

Have tried to work with provided example module https://github.com/cgmartin/ZF2FileUploadExamples, but i does not work with my project. (Same "no upload in progress")

So far i had tried to make it work with skeleton application, and it works, but when i add ZfcUser module, it gives same message. As i think, it is because of session maded by zfcUser, but dont know how to avoid such thing. And in skeleton application + file upload example, if i use ip address it works, if using domain - not("no upload in progress")

Thanks for helping!

UPD

If using uploadprogress php extension, both of them(uploadprogress and session progress) returns nothing.

If clear all session and cookies, then i able to upload file.

If i manually add somewhere session , then i dont able see progress, sometimes i get Erroneous data format for unserializing 'Zend\Stdlib\ArrayObject' in /var/www/html/vendor/zendframework/zend-session/src/SessionManager.php on line 109 and session_start() failed to decode session object. Session had been destroyed , sometimes just progress return "no upload in progress".

  • 写回答

1条回答 默认 最新

  • dpvhv66448 2016-03-14 19:22
    关注

    The thing with ZF2's Session Manager configured by default is it saves the session data as object. And if the class of that object is not available to PHP, it won't be able to deserialize it thus the error: missing 'Zend\Stdlib\ArrayObject'.

    IMVHO you should configure the Session Manager to use a different session name instead of default PHPSESSID so it won't interfere with other scripts like your upload-progress-script.

    评论

报告相同问题?