GithubHelp home page GithubHelp logo

Comments (10)

zfbot avatar zfbot commented on August 17, 2024

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF-12438

Known GitHub users mentioned in the original message or comment:

from zf1.

vestigal avatar vestigal commented on August 17, 2024

I was the original filer of this bug, back when it was on Jira.

from zf1.

ionutfechete avatar ionutfechete commented on August 17, 2024

Still have this problem.. @vestigal Did you solved it? if yes, how? Thanks!

from zf1.

tomasfejfar avatar tomasfejfar commented on August 17, 2024

I just experienced this bug now.

In my case it was caused by the fact that sessions directory was not writable. It seems that Zend_Session checks only for success and assumes that any other result means session is already started.

cc @simonrjones

from zf1.

tomasfejfar avatar tomasfejfar commented on August 17, 2024

I actually debugged it to the fact that the exception is not thrown but added as a response exception instead - it's because it's initialized before Zend_Controller_Plugin_Errorhandler sets Zend_Controller_Front::getInstance()->throwExceptions() to true. Therefore the internal session exception
Zend_Session::start() - /Users/tfejfar/libs/zf1/library/Zend/Session.php(Line:488): Error #2 session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: open(/Users/tfejfar/sites/crossrail/application/../data/sessions/sess_8cae2e4a007afd2274821015f8c0ef45, O_RDWR) failed: Permission denied (13) /Users/tfejfar/libs/zf1/library/Zend/Session.php(Line:488): Error #2 session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct

is added to exception stack, but later in the request when actually using the session the new "session already started" it's after the error handler set to throw the exceptions - so that one is thrown, but the first one is forgotten. But it's still in the exceptions stack ($this->_response->_exceptions).

One way to fix this could be to throw the first exception from exception stack if one is present. But that may not be the right one.

from zf1.

tomasfejfar avatar tomasfejfar commented on August 17, 2024

What would you think would be a good way to fix this? I could do a PR to fix it, but I'm not sure how exactly to fix it.

from zf1.

DominikAngerer avatar DominikAngerer commented on August 17, 2024

Currently facing this issue on my server - no changes made by us - also the folder are accessible and writeable.

from zf1.

tomasfejfar avatar tomasfejfar commented on August 17, 2024

You need to debug it to find out the core exception as described in my post above. That will set you on the right path :)

from zf1.

DominikAngerer avatar DominikAngerer commented on August 17, 2024

I found the issue. It was a long running - and sadly not good configured project. After thinking about permission problems or similar it was a simply as you can think. There where too many open session or better too many OLD session and the IIS simply couldn't handle that much files so the PHP IO was higher than the PHP execution time - removing the old Session's the problem simply was gone.

Thanks anyway @tomasfejfar!

from zf1.

antares7364 avatar antares7364 commented on August 17, 2024

This error message can also be caused by wrong permissions on the sessions folder, if the folder is not writeable or doesn't belong to the right user.

from zf1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.