|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49142 crash when exception thrown from __tostring() (PHP_5_3 only!)
Submitted: 2009-08-03 16:01 UTC Modified: 2009-10-27 22:05 UTC
From: ies_clan at hotmail dot com Assigned: dsp (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.3 (2009-08-04) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
37 + 31 = ?
Subscribe to this entry?

 [2009-08-03 16:01 UTC] ies_clan at hotmail dot com
plz first load the zip and install the script:

in the root dir is a sql file.
u have to edit the exceptionBug\Engine\Configuration\Password.Inc.php

after that, u can start it.

if u see the login page, klick on the link: Login mit EnemyArea und test

sometimes often, until u got loged in. then klick on the next link: EnemyArea

and the apache will crash with the following msg: unbehandelte ausnahme in httpd.exe [4624]

to fix it you have to go into the MKLF\System\Engine\StyleSheet.class.php

the line //use MKLF\System\Engine\Exceptions\SystemException; is the problem.

if u comment that in, it will work.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-03 22:27 UTC]
Reduced reproduce script:


class AScript
    public static function CreateFiles()
        file_put_contents('temp.txt', new self);

    public function __toString()
        throw new Exception('Server Crash!');

function foo() { return true; }

session_set_save_handler( 'foo', 'foo', 'foo', 'foo', 'foo', 'foo' );


 [2009-08-03 22:27 UTC]
Program received signal SIGSEGV, Segmentation fault.
zend_hash_num_elements (ht=0x8e05b50) at /home/jani/src/php-
1014    {
(gdb) bt
#0  zend_hash_num_elements (ht=0x8e05b50) at /home/jani/src/php-
#1  0x082a3a00 in zend_error (type=148921168, format=0x8716124 "%s") 
at /home/jani/src/php-5.3/Zend/zend_variables.h:45
#2  0x08254a7a in php_verror (docref=0x0, params=0x83723ec "", type=2,
    format=0x86eb0dc "Failed to write session data (%s). Please verify 
that the current setting of session.save_path is correct (%s)",
    args=0xbfe5ed9c "3\204n\b&#65533;#7\b\"") at /home/jani/src/php-
#3  0x08254f51 in php_error_docref0 (docref=0x0, type=2,
    format=0x86eb0dc "Failed to write session data (%s). Please verify 
that the current setting of session.save_path is correct (%s)")
    at /home/jani/src/php-5.3/main/main.c:806
#4  0x0817fff5 in php_session_flush () at /home/jani/src/php-
#5  0x08180281 in zm_deactivate_session (type=1, module_number=22) at 
#6  0x082a4310 in module_registry_cleanup (module=0x8ceb6e8) at 
#7  0x082adb84 in zend_hash_reverse_apply (ht=0x8757600, 
apply_func=0x82a42f0 <module_registry_cleanup>)
    at /home/jani/src/php-5.3/Zend/zend_hash.c:755
#8  0x082a2a19 in zend_deactivate_modules () at /home/jani/src/php-
#9  0x0825360a in php_request_shutdown (dummy=0x0) at 
#10 0x08321224 in main (argc=3, argv=0xbfe5f374) at 

 [2009-10-27 13:02 UTC]
Automatic comment from SVN on behalf of dsp
Log: - Fixed bug #49142 (crash when exception thrown from __tostring())
 [2009-10-28 11:08 UTC]
Automatic comment from SVN on behalf of pajoye
Log: - Merge revision 289987, Fixed bug #49142 (crash when exception thrown from __tostring())
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 08:01:24 2019 UTC