Jump to content

Session clash when bootstrapping API


Rob
 Share

Recommended Posts

Afternoon all.

I'm bootstrapping the API (by including index.php) from my  application which is built using the Silex micro-framework.

I have run into a problem after updating to more recent versions of several Symfony components.  Basically I cannot start the Silex session component because it is reporting that the PHP session has already started.  This has not been a problem until now so I can only presume that the previous version of the Symfony session component was not checking if the session had already started.

Long story short - is it possible to disable the Processwire session handling when using the API? Unless I am mistaken, if I am using my own session handling mechanism and only using the API to fetch page data etc then I should not need Processwire to have it's own session handling as it will not be being used.

Any help gratefully received as I am basically dead in my tracks with this problem!

Link to comment
Share on other sites

Another way would be to create a module to extend the WireSessionHandler (/wire/core/WireSessionHandler.php) and leave the implementation blank. WireSessionDB module would be a good template to remove code from. Though have not tried it and not positive it would work. But it sounds like you've already found a potentially better solution. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...