Hello,
I used MODx to setup a comparatively small website. Some 20 pages using two languages. The pages are static, but I use PHx and Ditto. On one page I have en eform.
I am wondering if I need the call of [tt]startCMSSession()[/tt] in [tt]index.php[/tt]. I have commented out that line, and the page still seems to work.
Can I leave sessions deactivated?
Thanks for hints
Martin
-
MODX Staff
- 10,725 Posts
How can the pages be static and use Ditto/PHx? Maybe if you explain what exactly you have done. MODx automatically starts the session when needed, but perhaps I misunderstand what index.php you are describing.
Oops yes that’s really a contradiction. What I meant is that the content is not subject to regular change and there is no user-interaction like a blog or a guest book.
In [tt]index.php[/tt] in the main directory the CMSSession is started in line 109 by [tt]startCMSSession()[/tt]. When I leave that line unchanged, the PHP Session is started and Firefox asks me if it may accept the cookie. If I comment out this line, no PHP session is started, and Firefox does not ask for that cookie. But the Website is displayed correctly. At least, as far as I can see.
That’s why I asked if I can abandon the session or if something that I might not be seeing will not work properly without the session.
-
MODX Staff
- 10,725 Posts
MODx requires the session to function properly.