Timeline for Override default php session
Current License: CC BY-SA 3.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 24, 2014 at 0:03 | comment | added | csbenjamin | You are right. Using a custom session storage, even calling the session_start() the php don't look. Thanks for your patience. | |
| Apr 24, 2014 at 0:00 | vote | accept | csbenjamin | ||
| Apr 23, 2014 at 23:47 | vote | accept | csbenjamin | ||
| Apr 23, 2014 at 23:56 | |||||
| Apr 23, 2014 at 22:12 | comment | added | Rouven Weßling | By default PHP will use the session handler configured in the php.ini. Most of these are locking, including the default file handler. But Joomla overrides this using session_set_save_handler(). This conversation is getting rather long, I'd encourage you to write a custom session handler and just test it. If you run into trouble consider opening a new question for the specific issue you encounter. | |
| Apr 23, 2014 at 20:39 | comment | added | csbenjamin | Ok, it seams that memcache session doesn't lock the session. But it doesn't seam use the native php function session_start(). In a clean php installation with default configuration, calling session_start() will lock the session. I tested it, and JSession class call this native php function. Have a look in this php.net/function.session-start#101452 | |
| Apr 23, 2014 at 20:02 | comment | added | Rouven Weßling | The Memcached class is part of PHPs Memcached extension and written in C. As a comparison here's a Memcached session storage that does locking:github.com/LeaseWeb/LswMemcacheBundle/blob/master/Session/… Calling session_start() does not cause locking by itself. That's up to the storage solution. | |
| Apr 23, 2014 at 19:11 | comment | added | csbenjamin | Yes, I tested the code that I posted above. The class in your link only call the method of the memcached object. Where is the memcached code? What do you mean with "don't enable locking in your driver"? Do you talk about the native session of php? Is there a way to call session_start() and don't lock the php session? | |
| Apr 23, 2014 at 18:49 | comment | added | Rouven Weßling | Have you tested this? If you don't enable locking in your driver than there will be no locking. Here's an example of a non-locking (non-Joomla) session storage: github.com/symfony/HttpFoundation/blob/master/Session/Storage/… | |
| Apr 23, 2014 at 18:17 | comment | added | csbenjamin | have a look on my edit above | |
| Apr 23, 2014 at 18:01 | comment | added | Rouven Weßling | How does it lock the session when your Storage class does not support locking? I suppose at this point it would be easier if you could show some code. | |
| Apr 23, 2014 at 17:57 | comment | added | csbenjamin | This doesn't work. The php session is started in JSession class in the method _start. This method calls session_start that looks the session. I think that I need override the JSession class. | |
| Apr 23, 2014 at 14:50 | vote | accept | csbenjamin | ||
| Apr 23, 2014 at 17:54 | |||||
| Apr 23, 2014 at 14:36 | comment | added | csbenjamin | I will not have trouble in specify the session manually in configuration.php. I create my own admin interface in angular with a global configuration page. Thanks for the answer. | |
| Apr 23, 2014 at 14:19 | history | answered | Rouven Weßling | CC BY-SA 3.0 |