NT problems
| From: | Chris Adams | Date: | Tue, 28 Mar 2000 09:44:42 +0000 |
| Subject: | NT problems | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-12732@lists.php.net to get a copy of this message | ||
Background:
I have developed a template-based content management system using PHP4 and
MySQL. Since there can be a non-trivial amount of processing involved and the
generated page will always be the same for any visitor, I decided to
implement a page caching system. index.php receives a request; based on the
parameters of the request it decided whether or not the results should be
cached. In either case, index.php will connect to the same webserver
fsockopen and make the same request to template.php. If it's cacheable, it
will also store the results in a local file so that the next request can be
filled merely by sending the contents of the file.
All of this works beautifully on Linux + Apache, with performance jumping
from less than 20 hits/second to almost 90 on a thoroughly unremarkable box.
Unfortunately, I need to run it on NT + IIS now. I've found three major
problems with PHP4 RC1:
1) Semi-frequently I will get some transient access violation. Usually a
reload will take care of this; what's disturbing is that I may get several
cycles of different spurious error messages (e.g. REG_BADPAT on perfectly
valid regular expressions) and then the page will work perfectly.
2) Less frequently, reading the socket while proxying a request will cause
inetinfo to go into some sort of infinite loop, requiring it to be killed and
restarted. I've confirmed that this actually occurs in the fgets/fread code
as bracketing the read call in error_log calls will show only a single call,
which never returns.
3) Frequently, PHP will get in some state where it thinks functions are being
defined multiple times while running a script. Sometimes the server may need
to be restarted for PHP to accept function declarations again. It does not
seem to make a difference whether the function in question is defined inline
in the script or in an include() file or even if there are any included files
at all. Thanks to the requires() bug on NT, I'm not using requires().
Does anyone have any ideas about a good way to track this down or at least
get more post mortem information? None of these things fail in obvious
fashions and I've yet to get a case where it will always fail. The caching
stage seems to exacerbate the problem but I've seen both #1 and #3 happen
even if I make requests directly to the template engine. This seems to be NT
specific as I've yet to see anything remotely like this happen under Linux
with the same code.
The machine is running NT 4 + SP6a with IIS & PHP4 RC1.
Thanks,
Chris