php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32304 Invalid exception code hangs server thread.
Submitted: 2005-03-14 21:24 UTC Modified: 2005-04-24 15:54 UTC
From: peter at letford dot co dot uk Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2005-03-15 OS: Windows XP Professional
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: peter at letford dot co dot uk
New email:
PHP Version: OS:

 

 [2005-03-14 21:24 UTC] peter at letford dot co dot uk
Description:
------------
If you throw an exception that doesn't use a number for the error code, a "Fatal Error" message box pops up saying:

Wrong parameter count for exception([string $exception [,long $code]])


This hangs the current server thread until the message box is selected which could be used to lock all of the available threads on the server and effectively take the server offline.


Reproduce code:
---------------
<?php

throw new Exception("Invalid Error Code -->", "ERRO_ASDASD");

?>

Expected result:
----------------
Throw an exception as normal.

Actual result:
--------------
The thread will hang and the page won't load until you close the message popup. It will then display this:


"Fatal error: Wrong parameter count for exception([string $exception [, long $code ]]) in Unknown on line 0"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-15 01:21 UTC] peter at letford dot co dot uk
Hi,

This bug exists on 5.1.0-dev
 [2005-03-19 12:37 UTC] tony2001@php.net
Can't reproduce.
Please provide more info about your system & try the latest snapshots from snaps.php.net
 [2005-03-25 01:54 UTC] 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-26 19:41 UTC] peter at letford dot co dot uk
Hi there,

I have now installed the latest PHP 5 and Apache 1.3.33 on a clean machine. Whilst the initial problem seems to have gone away the Apache web server now crashes but I believe it's still a problem of PHP because debug log mentions php5ts.dll saying the following:

szAppName: Apache.exe
szAppVer: 0.0.0.0
szModName: php5ts.dll
szModVer: 5.1.0.0
offset: 00007c9e

An interesting fact that the offset is _allways_ the same. Although it doesn't crash every time you run the example code (from original bug report) holding refresh for a few seconds causes the problem consistantly.

I have saved the memory dump of the program if you need it.
 [2005-04-05 10:11 UTC] tony2001@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-04-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-04-24 15:52 UTC] peter at letford dot co dot uk
I have just downloaded the latest snapshot and the bug appears to have been fixed.

Thanks


Peter.
 [2005-04-24 15:54 UTC] tony2001@php.net
Not reproducible anymore -> closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 12:01:30 2024 UTC