You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2003/04/03 11:45:17 UTC
DO NOT REPLY [Bug 18647] New: -
Apache crashed when derived class had no constructor [PHP]
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18647
Apache crashed when derived class had no constructor [PHP]
Summary: Apache crashed when derived class had no constructor
[PHP]
Product: Apache httpd-1.3
Version: 1.3.27
Platform: PC
OS/Version: Windows 9x
Status: NEW
Severity: Critical
Priority: Other
Component: Other mods
AssignedTo: bugs@httpd.apache.org
ReportedBy: a.eibach@gmx.net
I've got a PHP script here with a very complex class structure.
To narrow down the bug, I've reduced this structure to a much simpler one and
removed all that database-specific crap.
It was my mistake. I had changed the class name to some other one, but
forgotten to rename the constructor inside as well. As, unlike in C++,
constructors are treated equally to functions in PHP, PHP "thinks" that this
constructor is just another function.
Since I suspect it's a problem with Apache's PHP module (I'm going the *.DLL
way), I set Component to 'Other mods'.
- Windows 98 SE
- PHP 4.3.1
- Apache 1.3.27
[CODE FOLLOWS]
...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 FINAL//EN">
<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#990000" VLINK="#003366" TEXT="#000000"
TOPMARGIN=16 LEFTMARGIN=10 MARGINWIDTH=10 MARGINHEIGHT=16>
<font face="Arial">
<?php
class employer extends db_entry
{
var $contactman;
function employer() /* constructor */
{
$this->contactman = new contact();
}
}
class contact extends employer
{
// function contact() // this is the constructor and it's MISSING!!!
// { // --> crash
// }
}
class db_entry
{
var $ct_entry;
function db_entry()
{
/* Indirekte Memberobjekte erzeugen */
$this->ct_entry = new contact();
}
}
$newentr = new db_entry();
echo "OK";
?>
</font>
</BODY>
</HTML>
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org