|
Posted by Rik on 07/25/07 17:45
On Wed, 25 Jul 2007 19:39:04 +0200, Sanders Kaufman <bucky@kaufman.net> =
=
wrote:
>>> I did have a mild concern that it could result in something called a=
=
>>> Zombie process, or that resources would be locked that don't need to=
=
>>> be,
>> Why are you always referring to such zombie processes? Forget that.
>> That's not an issue here (and shouldn't be an issue with PHP at all).=
>
> Until a few years ago, I'd always been a Microsloth programmer. When =
I =
> went *nix, I wrote an article for CNET about using PHP with MySQL. In=
=
> it, I connected to a database with "$x =3D mysql_connect()" instead of=
the =
> way their guys liked, which was "mysql_connect() or die".
>
> Their guys said that it would result in Zombie processes - something I=
=
> had to dig around to find out about - and I still don't fully understa=
nd =
> them. Since I'm still a loooong way from being a *nix guru, I've been=
=
> hyper-vigilant about not accidentally wasting a bunch of resources.
>
> As it turned out, they were wrong. But, like Jerry, they were sooooo =
=
> adamant, it turned into a big broo-ha-ha and I've been a bit gun-shy =
> about 'em ever since.
I could've told you they were wrong. Then again, this is quite clear in =
=
the documentation.
Compare your current use of the constructor with people who used the =
string value of objects: it was an undocumented feature, and it came to =
=
bite them in the ass when things were changed.
Just don't rely on anything db-wise to work later on in the script, so y=
ou =
should probably die()/exit() or redirect to create a somewhat nice degra=
de.
-- =
Rik Wasmus
[Back to original message]
|