|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41744 about try...catch...
Submitted: 2007-06-20 00:42 UTC Modified: 2007-06-21 23:04 UTC
From: edwardhey at 163 dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.1 OS: freebsd
Private report: No CVE-ID:
 [2007-06-20 00:42 UTC] edwardhey at 163 dot com

when i use 'try' to catch the 'exception',the server throw me the 
Fatal error.

php: php5.2.1/fastcgi
server: apache2.2.3

Reproduce code:
try {
    $error = 'Always throw this error';
    throw new Exception($error);
    echo 'Never executed';

} catch (Exception $e) {
    echo 'Caught exception: ',  $e->getMessage(), "\n";
echo 'Hello World';

Expected result:
Fatal error: Uncaught exception 'Exception' with message 'Always throw this error' in /www/ Stack trace: #0 {main} thrown in /www/ on line 4


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-20 07:01 UTC]
Do you have any extensions loaded, particularly "Zend" extensions?
 [2007-06-20 07:20 UTC] edwardhey at 163 dot com
yes,i have
about this:
   Zend Extension  220060519  

My phpinfo information:

thanks a lot!
 [2007-06-20 10:02 UTC]
First you need to disable all 3rd party extensions, like any Zend extensions.
 [2007-06-20 10:03 UTC]
And why do you report bugs in old releases? The latest is have 5.2.1!
 [2007-06-20 23:42 UTC] edwardhey at 163 dot com
i will keep trying and upgrade my php, thanks a lot!
 [2007-06-21 21:49 UTC]
Please try using this CVS snapshot:
For Windows (zip):

For Windows (installer):

Please keep the status as Feedback until you'Ve updated PHP so we can keep track of the issue.
 [2007-06-21 22:56 UTC] judas dot iscariote at gmail dot com
This bug can be safetely labeled bogus.

This is a bug on Eaccelator optimizer.

rebuild EA with --without-eaccelerator-optimizer and should work again.

Remember, do not fill bug reports with zend extensions loaded !!
 [2007-06-21 23:04 UTC]
Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

Thanks for the info about eAcc.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 05:01:47 2015 UTC