#32225 [NoF->Opn]: Tokenizer fails after fatal error until timeout or apache restart
| From: | paul dot laughlin at ingramentertainment dot com | Date: | Tue, 22 Mar 2005 21:55:31 +0000 |
| Subject: | #32225 [NoF->Opn]: Tokenizer fails after fatal error until timeout or apache restart | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75724@lists.php.net to get a copy of this message | ||
ID: 32225
User updated by: paul dot laughlin at ingramentertainment dot com
Reported By: paul dot laughlin at ingramentertainment dot com
-Status: No Feedback
+Status: Open
Bug Type: Reproducible crash
Operating System: Gentoo Linux 2.6.10
-PHP Version: 5.0.3
+PHP Version: PHP 5.1.0-dev (built: Mar 22 2005 15:40:32)
New Comment:
Tested this problem with the snapshot as instructed. This is still a
problem in the snapshot.
THank you
Previous Comments:
------------------------------------------------------------------------
[2005-03-20 18:11:55] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2005-03-07 20:04:47] sniper@php.net
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
------------------------------------------------------------------------
[2005-03-07 19:23:37] paul dot laughlin at ingramentertainment dot com
Description:
------------
If you have a fatal error it breaks token_get_all until an apache
restart...
Reproduce code:
---------------
-- Sample Token file <test.file>
Some HTML
<? TEST_TAG ?>
Some More HTML
<? Another_TAG ?>
More HTML
-- End Sample Token File
-- PHP Script --
<?php
$rawData = file_get_contents('test.file');
foreach (token_get_all($rawData) as $token) {
echo '<pre>';
print_r($token);
echo '</pre>';
}
?>
-- End PHP Script --
If you introduce a parse error as follows, fix the error and reload you
get broken output until apache restart.
<?php
broken...
$rawData = file_get_contents('test.file');
foreach (token_get_all($rawData) as $token) {
echo '<pre>';
print_r($token);
echo '</pre>';
}
?>
Expected result:
----------------
Array
(
[0] => 310
[1] => Some HTML
)
Array
(
[0] => 365
[1] =>
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 306
[1] => TEST_TAG
)
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 367
[1] => ?>
)
Array
(
[0] => 310
[1] => Some More HTML
)
Array
(
[0] => 365
[1] =>
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 306
[1] => Another_TAG
)
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 367
[1] => ?>
)
Array
(
[0] => 310
[1] => More HTML
)
Actual result:
--------------
Array
(
[0] => 306
[1] => Some
)
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 306
[1] => HTML
)
Array
(
[0] => 368
[1] =>
)
<
?
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 306
[1] => TEST_TAG
)
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 367
[1] => ?>
)
Array
(
[0] => 310
[1] => Some More HTML
)
Array
(
[0] => 365
[1] =>
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 306
[1] => Another_TAG
)
Array
(
[0] => 368
[1] =>
)
Array
(
[0] => 367
[1] => ?>
)
Array
(
[0] => 310
[1] => More HTML
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32225&edit=1