ID: 27895
Comment by: jevon at jevon dot org
Reported By: mes at zeroc dot com
Status: Open
Bug Type: Zend Engine 2 problem
Operating System: Windows 2000/XP
PHP Version: 5.0.0RC1
New Comment:
I eliminated (or seem to have reduced) my Access Violation errors by
using the CGI version (php-cgi.exe) of PHP5 RC1 with IIS. I was using
the ISAPI version before. I also never got any errors using the CLI
version of PHP.
Incidentally, I never seemed to get an Access Violation (with the ISAPI
version) on the first PHP request in each webserving session. (Perhaps
it's running out of memory or something - I'm guessing the ISAPI
version uses a global memory pool whereas CGI/CLI creates new memory
each request?)
Previous Comments:
------------------------------------------------------------------------
[2004-04-07 14:54:11] mes at zeroc dot com
I tried again with the current snapshot, and got the same result.
------------------------------------------------------------------------
[2004-04-07 05:25:05] jevon at jevon dot org
(Oops, my report isn't using the new snapshot.)
------------------------------------------------------------------------
[2004-04-07 05:23:55] jevon at jevon dot org
I can occasionally get it to crash with almost any exception too,
thrown outside of a class, like so:
<?php
class E extends Exception { } // don't know if this makes a difference
try {
throw new E();
} catch (Exception $e) {
// do nothing - don't know if this makes a difference
}
echo "42";
?>
Access Violations occur less frequently, but still do occur. Access
violations are more likely to be caused, the more complex the script
becomes. A small 4000-line web application (I can share source) almost
NEVER runs without an Access Violation (but it does occasionally!)
I can show that the number of times required to run the script before
crash is indeed random:
<?php
for ($j = 0; $j < 50; $j++) {
for ($i = 0; $i < 100; $i++) {
if (($str = file_get_contents("http://url_to_script?$i")) != "42")
{
echo $i . "access violation [$str]";
break;
} else {
$s++;
}
}
}
?>
By echoing $i repeatedly, sometimes it will never fail; other times it
will repeatedly crash after 1-10 file_get_contents()s.
I guess it's a problem with memory allocation? I get a lot of Access
Violations and can't continue developing with them all.
OS: Windows XP Pro SP1
Server: Microsoft IIS 5.1
MySQL: 4.1.1 alpha
PHP: 5.0RC1
Keep up the good work :)
------------------------------------------------------------------------
[2004-04-07 05:15:06] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-04-07 05:14:59] [EMAIL PROTECTED]
Does not crash within Linux (debug/no-debug)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27895
--
Edit this bug report at http://bugs.php.net/?id=27895&edit=1