1. The circumstances: This script is part of a cron job that runs every minute. The script checks if a modified flag is more recent than the cached pages and if it is it rebuilds a whole bunch of other pages. (it also checks that another rebuild isn't in progress, etc)
The hosting company was doing some upgrades and at some point thereafter I started receiving automated cron failures:
'/usr/libexec/ld-elf.so.1: /usr/local/lib/libxml2.so.5: Undefined symbol
"pthread_once"'
even with cron message /dev/null'd. I spoke to the hosting company, they changed something and now it segfaults when run by cron, and runs, but incorrectly when run from the command-line.
The script previously has been in operations for about 3 years, with no problems. I think the hosting company is a little stumped, so I'm hoping to find something to help them out.
2. What I've discovered: Inside some of the code, its handling of arrays seems very wrong now. Condensing it to its simplest:
Code: Select all
$aStyle = array(1,2,3);
print_r($aStyle);
foreach ($aStyle as $anEvent) {
print_r($anEvent);
}Code: Select all
Array
(
ї0] => 1
ї1] => 2
ї2] => 3
)
Array
(
ї0]=>1
ї1]=>0
)
Array
(
ї0]=>2
ї1]=>0
)
Array
(
ї0]=>3
ї1]=>0
)Thank you