php-general Digest 25 Oct 2013 14:01:46 -0000 Issue 8409

2013-10-26 Thread php-general-digest-help

php-general Digest 25 Oct 2013 14:01:46 - Issue 8409

Topics (messages 322370 through 322375):

Persistent connections
322370 by: Nibin V M
322371 by: Stuart Dallas
322372 by: Nibin V M
322373 by: Stuart Dallas
322374 by: Nibin V M

Re: framework or not
322375 by: Robert Cummings

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
--- Begin Message ---
Hello,

I have been reading docs and many are telling that persistent connections
are kept open indefinitely. But I found in PHP docs that it will not close
after script execution like requesting  a page; so should it close after
the request is over?

So when exactly a persistent connection should close?

Please advice.

-- 
Regards

Nibin.
--- End Message ---
--- Begin Message ---
On 25 Oct 2013, at 11:10, Nibin V M  wrote:

> I have been reading docs and many are telling that persistent connections
> are kept open indefinitely. But I found in PHP docs that it will not close
> after script execution like requesting  a page; so should it close after
> the request is over?
> 
> So when exactly a persistent connection should close?
> 
> Please advice.

A persistent connection is closed when the PHP process ends, or it gets 
disconnected by the server-side or due to a network error. Attempting to 
explicitly close a persistent connection will do nothing without complaining.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--- End Message ---
--- Begin Message ---
Thank you for the quick response Stuart...one more doubt..at
http://php.net/manual/en/features.persistent-connections.php they states

=
This means that when the same client makes a second request to the server,
it may be served by a different child process than the first time. When
opening a persistent connection, every following page requesting SQL
services can reuse the same established connection to the SQL server
=

Is the persistent connection pool is re-used between apache child
processes ?


On Fri, Oct 25, 2013 at 3:54 PM, Stuart Dallas  wrote:

> On 25 Oct 2013, at 11:10, Nibin V M  wrote:
>
> > I have been reading docs and many are telling that persistent connections
> > are kept open indefinitely. But I found in PHP docs that it will not
> close
> > after script execution like requesting  a page; so should it close after
> > the request is over?
> >
> > So when exactly a persistent connection should close?
> >
> > Please advice.
>
> A persistent connection is closed when the PHP process ends, or it gets
> disconnected by the server-side or due to a network error. Attempting to
> explicitly close a persistent connection will do nothing without
> complaining.
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>



-- 
Regards

Nibin.

http://TechsWare.in
--- End Message ---
--- Begin Message ---
On 25 Oct 2013, at 12:51, Nibin V M  wrote:

> Thank you for the quick response Stuart...one more doubt..at 
> http://php.net/manual/en/features.persistent-connections.php they states
> 
> =
> This means that when the same client makes a second request to the server, it 
> may be served by a different child process than the first time. When opening 
> a persistent connection, every following page requesting SQL services can 
> reuse the same established connection to the SQL server
> =
> 
> Is the persistent connection pool is re-used between apache child processes ? 

No, connections are not shared between PHP processes. Nothing is shared between 
PHP processes.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


> On Fri, Oct 25, 2013 at 3:54 PM, Stuart Dallas  wrote:
> On 25 Oct 2013, at 11:10, Nibin V M  wrote:
> 
> > I have been reading docs and many are telling that persistent connections
> > are kept open indefinitely. But I found in PHP docs that it will not close
> > after script execution like requesting  a page; so should it close after
> > the request is over?
> >
> > So when exactly a persistent connection should close?
> >
> > Please advice.
> 
> A persistent connection is closed when the PHP process ends, or it gets 
> disconnected by the server-side or due to a network error. Attempting to 
> explicitly close a persistent connection will do nothing without complaining.
> 
> -Stuart
> 
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
> 
> 
> 
> -- 
> Regards
> 
> Nibin.
> 
> http://TechsWare.in

--- End Message ---
--- Begin Message ---
ok..thank you very much Stuart :)


On Fri, Oct 25, 2013 at 6:02 PM, Stuart Dallas  wrote:

> On 25 Oct 2013, at 12:51, Nibin V M  wrote:
>
> > Thank you for the quick response Stuart...one more doubt..at
> http://php.net/manual/en/features.persistent-conne

php-general Digest 26 Oct 2013 08:44:06 -0000 Issue 8410

2013-10-26 Thread php-general-digest-help

php-general Digest 26 Oct 2013 08:44:06 - Issue 8410

Topics (messages 322376 through 322384):

Re: framework or not
322376 by: Stuart Dallas
322378 by: Robert Cummings
322380 by: Stuart Dallas
322381 by: David Harkness

News Regard Attack; Announcing Official php.net Twitter Account
322377 by: Daniel Brown
322379 by: Tedd Sperling

I am puzzled. Error on one site, no error on the other
322382 by: Stephen
322383 by: Aziz Saleh

Does a call to trigger_error ever return?
322384 by: Peter West

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
--- Begin Message ---
On 25 Oct 2013, at 15:01, Robert Cummings  wrote:

> On 13-10-24 09:41 PM, Larry Garfield wrote:
>> On 10/23/2013 08:51 AM, Jay Blanchard wrote:
>>> [snip] a bitter rant[/snip]
>>> 
>>> Dang Larry - bad night?
>> 
>> That wasn't a bitter rant.  You haven't seen me bitter. :-)  That was
>> "tough love" to the OP.  I don't see a reason to pussyfoot around the
>> original question, which is one that comes up about once a month.  The
>> answer is always the same: How much is your time worth?
> 
> Basic math...
> 
>Life: finite
>Time: infinite
> 
>finite / infinite = 0
> 
> *sniffle*

Who's valuation of your time actually matters? Yours, and yours alone.

Therefore:

Life: n years
Time I can benefit from my life: n years

n years / n years = 1

*hoorah*

Your time is the most precious commodity you have.

Whether you use a framework or not you will (hopefully) reuse code between 
projects. If you choose to make part of that reused code one of the many 
frameworks that exist, you need only do one thing to ensure it continues to be 
worth using: how much of your time do you spend battling against the 
restrictions of the framework? If that's sufficiently low then using that 
framework is probably a good thing. If a significant portion of your time is 
spent battling the framework it's time to make a change.

Also remember that the only person who can truthfully judge whether you're 
"wasting time" is you, unless you earn money by selling your time to someone 
else in which case they have some right to decide what constitutes a waste of 
the time for which they're paying. I found the experience of writing my own 
framework to be hugely beneficial to my future productivity, but I might have 
struggled to justify spending the extra time it took to my employer at the time.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--- End Message ---
--- Begin Message ---

On 13-10-25 10:17 AM, Stuart Dallas wrote:

On 25 Oct 2013, at 15:01, Robert Cummings  wrote:


On 13-10-24 09:41 PM, Larry Garfield wrote:

On 10/23/2013 08:51 AM, Jay Blanchard wrote:

[snip] a bitter rant[/snip]

Dang Larry - bad night?


That wasn't a bitter rant.  You haven't seen me bitter. :-)  That was
"tough love" to the OP.  I don't see a reason to pussyfoot around the
original question, which is one that comes up about once a month.  The
answer is always the same: How much is your time worth?


Basic math...

Life: finite
Time: infinite

finite / infinite = 0

*sniffle*


Who's valuation of your time actually matters? Yours, and yours alone.

Therefore:

Life: n years
Time I can benefit from my life: n years

n years / n years = 1

*hoorah*

Your time is the most precious commodity you have.

Whether you use a framework or not you will (hopefully) reuse code between 
projects. If you choose to make part of that reused code one of the many 
frameworks that exist, you need only do one thing to ensure it continues to be 
worth using: how much of your time do you spend battling against the 
restrictions of the framework? If that's sufficiently low then using that 
framework is probably a good thing. If a significant portion of your time is 
spent battling the framework it's time to make a change.

Also remember that the only person who can truthfully judge whether you're "wasting 
time" is you, unless you earn money by selling your time to someone else in which 
case they have some right to decide what constitutes a waste of the time for which 
they're paying. I found the experience of writing my own framework to be hugely 
beneficial to my future productivity, but I might have struggled to justify spending the 
extra time it took to my employer at the time.


You stripped away the context of my response. By removing the evil grin 
you made it look like I was serious. You should be a reporter ;)


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s