#39659 [Opn->Fbk]: CGI crash on certain constuctors

From: Date: Tue, 28 Nov 2006 13:00:09 +0000
Subject: #39659 [Opn->Fbk]: CGI crash on certain constuctors
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-105544@lists.php.net to get a copy of this message
ID: 39659 Updated by: tony2001@php.net Reported By: mark at temporal-solutions dot co dot uk -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Windows XP SP2 PHP Version: 5.2.0 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2006-11-28 12:57:15] mark at temporal-solutions dot co dot uk Sorry, I forgot to mention its running on IIS 5.1 with all patches applied. ------------------------------------------------------------------------ [2006-11-28 12:56:06] mark at temporal-solutions dot co dot uk Description: ------------ PHP causing php-cgi.exe crash when creating child class with default constructor values. $this->sp_user_count = new oopi_Label($this); oopi_label is class oopi_Label extends oopi_Control which just happens to have constructor __construct($parent, $id = '', $value = NULL) somehow just calling it with $this resulted in PHP self destructing Reproduce code: --------------- class oopi_Control { public $id; public function __construct($parent, $id = '', $value = NULL) { ... $this->id = $id; ... } }; class oopi_Label extends oopi_Control { ... }; $sp_user_count = new oopi_Label($this); Expected result: ---------------- Created object with default id of '' Actual result: -------------- No results - CGI crash reading null pointer and returning no headers. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39659&edit=1

« previous php.bugs (#105544) next »