tags:

views:

22

answers:

3

The session files are saved at session_save_path().'/sess_'.session_id().

Is 'sess_' hard-coded?

If it can be specified, how do I do that?

A: 

I think it's hard-coded - at least, I can see no configuration option or parameter to control this.

The manual page for session_save_handler() provides a full example for a custom handler. If all else fails, you can use that to implement your own handler, and change the naming format there.

Pekka
A: 

Answer found on http://php.net/manual/en/function.session-set-save-handler.php. It's hard-coded.

Flavius
Where on the page does it say that?
Pekka
+1  A: 

Yes, sess_ is a hard-coded prefix for the session file name. You can see that in the source file mod_files.c:

#define FILE_PREFIX "sess_"
Gumbo