Re: [PHP] Sessions running out of storage space - Increase memory?
Dan wrote: > I need to retrieve a huge amount of data form a database and do so many > times. To eliminate the overhead of connecting to the database and > pulling down all that info over and over, I'm trying to pull it down > only once and stick it into a session. The problem is I get the first > few results and everything works fine. But then after those first 5 or > so I only get 0's. My first thought is that this is because of a limit > on memory that sessions can take up or file size/space where the > sessions are stored. I looked in the PHP.INI and I didn't find anything > though. > > Any ideas on how to fix this problem or a more elegant solution to my > huge data needs? > > - Dan APC? apc_store('some_array',serialize($some_array),86400); caches $some_array in RAM for 24 hours. $some_array = unserialize(apc_fetch('some_array')); brings it back out. Note - don't do this if you're dealing with massive amounts of data unique to each session_id, though. Come to think of it... if you're dealing with massive amounts of data for each session_id, that might be part of your problem. :) Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session with microtime
Panquekas wrote: > On 20/04/07, Panquekas <[EMAIL PROTECTED]> wrote: > I'm sorry, my mistake. What I tried to say is that the session_start() was > on the top of the page, and the if( ) block was after that and the login > script was even after the if( ), so the first thing to ran was the > session_start() then the if( ) block and after that the login script > registering the $_SESSION's. I moved the login script to the middle of the > session_start() and the if( ). Am I the only one that uses 'session.auto_start = 1'? It saves me from worrying about that type of problem. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a new shared host with php
Al wrote: > I'm looking for a shared host with an up-to-date php5, and one who at > least tries to keep it relatively current. > > Needs are modest. Just need good ftp access, cgi-bin, shell, etc. > > Any suggestions. I'm looking at Host Monster, anyone have experience > with them? > > Thanks... > I've used http://phpwebhosting.com for several years, they're quite good, and for $10/month they offer what you're looking for. They're stuck on php 5.12, though. I know a guy who knows the guy behind http://dataslab.com. That seems like a pretty darn good deal($20/month), though I've not really researched the VPS market. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Count the Number of Elements Using Explode
Diogo Neves wrote: Hi Alice, U can simple do: $nr = ( strlen( $message ) / 2 ) + 1 ); $nr = count( explode( '|', $message ); Or... $num = (substr_count($message, "|") + 1); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php