| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: LifesCircle.info
Posts: 954
![]() ![]() ![]() ![]() ![]() | [WTH]MySQL to PHP 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.
__________________ Buy Backlinks |
| |
| | #2 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,074
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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. |
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: LifesCircle.info
Posts: 954
![]() ![]() ![]() ![]() ![]() | 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.
__________________ Buy Backlinks |
| |
| | #4 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,074
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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. |
| |
| | #5 (permalink) | ||||
| New Member Join Date: Mar 2007
Posts: 16
![]() |
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. | ||||
| |