I've fixed the problem (well, I think),
That is good news, well done.
but I haven't figured out what it was. I'm working on creating a simplest case. I know that it has something to do with making a reference to a session variable, as in:
$loc=&$_SESSION['local'];
And then subsequently changing it, in some specific way under some specific circumstances that I haven't isolated yet.
Answering your questions:
1. I'm using apache in it's default mode (so pre-fork or child, whatever it does out of the box)
prefork, so that is OK.
2. php in module mode. (The reason I have "php-bin" is because I want only that directory to execute php scripts, not the whole site- is that possible to do? I haven't looked at how yet in the httpd.conf, I think it'll be easy. I'm using php only for applications, not the "inline html" stuff, I don't like that.)
Understood. Yes, if you only want php executable in php-bin, put the three lines in /etc/httpd/conf.d/php.conf between directory directives:
<Directory /var/www/html/php-bin>
Load.....
Add....
...
</Directory>
If you have php files in any other directory they will now be served as the DefaultType, normally text/plain, so the source code would be seen. I'd suggest removing any php files from other directories.
There's nothing unusual about my setup, it ended up being something unusual in my code (although not a "mistake" and nothing forbidden by the manual as far as I know (?)) and likely a php bug (aren't all segfaults bugs, by nature? I guess excepting infinate loops and dividing by zero etc...). And as for the baby and the bathwater- would you put code that had this problem onto a site, if you couldn't fix it? or would you switch to something else? (What I said was "I need to insure that this doesn't keep happening on the production site or we have to bail out of php"- you really don't agree with that sentence?)
By "setup" I meant to include the code in that, but I was not specific. No, I would not put that code live with that problem. The point I wanted to make is that I would try to fix the problem rather than make a major change to a different language, which would have its own set of limitations/problems. It just seemed an extreme step to me, as the problem is some form of bug with the particular installation/code you have there, rather than a generic problem (like php no good).
Thanks Chris, I'll try to make an isolated case for the sake of the php project and report back. thanks,
Yes, that would be very helpful. If you do get a simple set of circumstances where it is repeatable then we can all try it and you can report it to php.net.
Regards
Chris