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
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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.