justin randell <[email protected]> writes:
> 2009/12/17 Daniel Pittman <[email protected]>:
>>
>> Use session affinity in your load balancer. No, really, with PHP it will
>> almost certainly hurt less. Sorry.
>
> i'm interested in the war-wounds that made you write that ;-)
Perhaps I should confess to being semi-ignorant about PHP: it could well be
that this was always easy, and I only found bad documentation about how to get
it working.
Way back when, during the days that PHP4 was still a going concern, and PHP5
pretty new, the best mechanism we could find for doing sessions not-on-disk
with PHP5 was to add a bunch of custom code to each application.
Given we had a pool of something like six custom applications, two commercial
and obfuscated with some PHP source-code-encrypted widget, the overhead of
maintaining custom changes to the PHP code for each application was too high
for either my tastes, or my client.
As far as I could tell it wasn't possible to just change, say, PHP.ini and
have it take care of storing all session data in the database using the
standard mechanisms.
So, there you have it: possibly poor choice of PHP applications, not written
by us, made life painful. :)
> having setup share-nothing php-heads writing session data to a database on
> several load-balanced architectures without any issues (directly related to
> that technique, of course), that response seems a bit blanket.
It probably was, even if I noted later that things may have improved since
I had my painful times. :)
Anyway, I am curious to know if that is still true: if I can't modify the PHP
code, can I store sessions in a database these days?
Daniel
You never know when someone is going to pay you to configure some crazy
commercial product and all. :)
--
✣ Daniel Pittman ✉ [email protected] ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html