[WTH] MySQL to PHP

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

Jerlene

Established Member
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
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
Close
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
Close
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
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Each character of a domain name in its own box, with how to type one of them
Bookmarks: see bookmarks without a label
You can now show only the bookmarks you have not labeled. Open the label filter in the Bookmarks tab of your account menu, or on your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back