[GRLUG] sysadmin job opening

Adam Tauno Williams awilliam at whitemice.org
Sun Jan 31 14:23:22 EST 2010


On Sun, 2010-01-31 at 09:50 -0500, Godwin wrote:
> On Sat, Jan 30, 2010 at 3:32 PM, Adam Tauno Williams
> <awilliam at whitemice.org> wrote

> Seems pretty familiar to me: we use VMware, Linux, Apache, PHP
> (sadly),
> DNS (bind), routing (RIPv2), VPN, IPtables, etc...
> ..just curious, why 'sadly' on PHP.  

1. "Invalid stack frame at line 0" crashes of the runtime rather than
raising exceptions.  This has something to do with string processing and
possibly relates to #4.  We see this occasionally in dealing with IMAP
connections [message text] or processing XML. 
 
2. Terrible PDO performance with large result sets.  Witness PHP's
transfer of the data over the wire, which takes over a minute,
<https://www.mormail.com/OGo12905012.2009051914.TransferRate.png> while
either .NET (Mono) or Python can retrieve the same data in slightly over
one second.

2.5. Binding parameters in PDO queries is also very touchy,  it is
trivial to crash the interpreter [again, no exception occurs].

3. The whole pass-by-reference vs. pass-by-value thing in PHP is a
confused mess.  Which maybe explains why seemingly valid code such as -

for ($enterprises as $e) {
  $a = array('name' => $e['name'],
             'location' => &$ogo->getSubkeyReference($e, '_ADDRESSES', 'type' 'location'));
 }

 - will crash PHP cold, but -

for ($enterprises as $e) {
  $l = &$ogo->getSubkeyReference($e, '_ADDRESSES', 'type' 'location');
  $a = array('name' => $['name'],
             'location' => &$l);
 }

- works.  Weird.

4. GC bugs.  Occasionally we've had to manually unset values at the end
of a script or PHP's garbage collection will crash as it seems to try to
dereference objects in the incorrect order.  Now we pretty much
deference manually in most cases to avoid the risk of that condition.
Sometimes the script will seem to work - you only notice if you are
monitoring the error logs that the script is actually crashing the
interpreter every time it runs.  The consequence of which also has a
measurable performance impact.

> For what do you use it, 

Large intranet and extranet applications.

> and which scripting language would you rather use?

None of the other alternatives exhibit these behaviors.




More information about the grlug mailing list