PHP 5.3 Windows Array assignment causes fault -
i struggling understand why php faulting without feedback or error (beyond windows error log, fault in php5 faulting module php) whilst executing following block of code:
$projects = array(); $pqres = $connection->getresult("select big query"); //build array project id while($record = sqlsrv_fetch_array($pqres)) { if(! array_key_exists($record['projectid'],$projects)) { $projects[$record['projectid']] = array(); } $projects[$record['projectid']][] = $record; //this line faults php after 9100 records }
the outcome same whether objects or arrays pulled sql resource, , offending line array assignment.
the assignment causes fault in php after around 9100 records.
if loop counted out execution termination controlled can see php has consumed 25mb of memory, configuration allowed 256.
the faulting record not same, can vary 3 or 4 indexes.
the code in fact quite pointless in round way groups records of same productid, interested know might cause php die suddenly.
thanks time.
i not sure mean fault. if means makes script terminate, suggest enabling error log , see final error message says. in case, may php bug, recommended report http://bugs.php.net/, right place php developers @ eventual bugs.
Comments
Post a Comment