You can change the session backend datastore from a script using session_module_name().

<?php
  session_module_name
("files");  // ASCII files

  
session_module_name("mm");     // Shared memory

  
session_module_name("user");   // Custom session backend
?>
You can also define your own custom session backend datastore using the session_set_save_handler() function.

<?php
  session_set_save_handler
("myOpen""myClose",
                         
"myRead""myWrite",
                         
"myDestroy""myGC");
?>
You would then write these 6 functions.