|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62225 apache segfault with function named init()
Submitted: 2012-06-04 18:03 UTC Modified: 2013-02-18 00:35 UTC
From: ehymel at e-medico dot com Assigned:
Status: No Feedback Package: Class/Object related
PHP Version: 5.4.3 OS: Fedora 17
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: ehymel at e-medico dot com
New email:
PHP Version: OS:


 [2012-06-04 18:03 UTC] ehymel at e-medico dot com
I have been using a set of scripts and classes for about a year without problem 
until recent upgrade from Fedora 16 to 17, which brought with it PHP 5.4.3. I 
started seeing segfaults in apache and I eventually narrowed the problem to the 
use of the function name 'init()'. See the code below.

After some experimentation, I found that by simply renaming the init() function to 
something else, like initialize(), then all works fine.

fwiw, I do not have ZendFramework installed (I believe that framework uses init() 
function quite a bit).

Test script:
class Foo {
    function __construct() {
        // construction functions
    function init() {    
        // init functions;

class Bar{
    function __construct() {
        // construction functions
    function initialize() {    
        // init functions;

Expected result:
No segfault.

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-05 02:18 UTC]
-Status: Open +Status: Feedback
 [2012-06-05 02:18 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot 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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 13 06:01:30 2024 UTC