Domain Empire

[WTH] MySQL to PHP

Spaceship Spaceship
Watch
Impact
23
My PHP sessions are stored in a MySQL database table, and not in files. The database is executing too many queries and this overloads my shared server.

My host strongly suggests I have my PHP sessions stored in files and not in MySQL database table. I don't know how to change that setting so I'm looking to hire someone that can do this for me.

Reply in this thread if you know how to do this and let me know the price you'll do it for. Make me an offer, I will not set a price. Thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
this should be very simple and SHOULD only require a line change in the php script.

In your script look for a line that looks like:-

session_set_save_handler("open", "close", "read", "write", "destroy", "gc");

this is where it is set.
 
0
•••
Sorry. I have no clue what that's all about. What exactly do I have to do?

Oh and what script will this be in? I have a lot of files on my server.
 
0
•••
without seeing the files it is impossible to say. An application can be made up of literally hundreds of files and the names and what is contained in them is pretty much up to the person who wrote it.

Regarding the line I posted. The line is an example piece of code that sets routines for php to know how to handle the sessions, by default php users files as your host is advising but this behaviour can be over written. It is possible they do not use php session handling at all but that is less likely.
 
0
•••
peter@flexiwebhost said:
Regarding the line I posted. The line is an example piece of code that sets routines for php to know how to handle the sessions, by default php users files as your host is advising but this behaviour can be over written. It is possible they do not use php session handling at all but that is less likely.


This is true, I've actually never thought about storing the sessions in a database, always used files by default. Since its a shared host he probably can't edit the php.ini file so he'll have to go with a solution like you suggested, setting the session mode in the actual request calls.
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back