I finally tracked this down and it turned out to be a bug
in the code. I also was mistaken when I said that the
code works in 4.1.2/Solaris. It didn't.
To make a long story short:
<?php
$foo = array(
"97" => "97",
);
$str = "";
foreach($foo as $id => $id)
// ^^^^^^^^^^
{
$str .= $foo[$id];
};
print $str;
?>
That foreach clause caused all sorts of weirdness
in my code - random variables were overwritten and
the script terminated without any output (nothing
in apache error_log either).
The above code is a minimized testcase I managed
to create, which behaves exactly the same way -
the script terminates without any output if it's
run on Solaris (both php4.1.2 and php4.2.2).
I was not able to compile php4.3 snapshot, so I don't
know whether that problem is still there.
Remember, this is on Sparc/Solaris8. The above testcase
works correctly in Linux and FreeBSD.
That foreach is pointless of course, I changed
it to foreach($foo as $id) and now it works on
all 3 platforms.
If someone wants to try to find the real cause for
the problem (because as far as I can tell, it's still
a bug in PHP) and needs any additional information
about the server and/or it's configuration then please
let me know. I'll happily provide it.
--
Anti Veeranna
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php