Jump to content

Sessions saved in Mysql


Bobscrachy

Recommended Posts

How do i save sessions into mysql using the session_set_save_handler?

 

I tried following this tutorial here, but I got hung up on certain parts.

 

1) If it is setup so that you can keep session_start(); unchanged how does the script know to point towards a php file with the session_set_save_handler code?

 

2) Does each function of the session_set_save_handler IE

('_open','_close','_read','_write','_destroy','_clean'); 

need their own php files, or are they all stored in one big file?

Link to comment
https://forums.phpfreaks.com/topic/82106-sessions-saved-in-mysql/
Share on other sites

Because wouldn't that be having stuff before the session_start code.

Warning: Cannot modify header information - headers already sent by()

 

So is this legal?

 

<?php

require "bob.php";

session_start();

 

stuff;

?>

 

where bob.php has all the session_set_save_handler code.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.