ID:               26579
 Comment by:       jonas at gauffin dot org
 Reported By:      jonas at datatal dot se
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: win2k
 PHP Version:      5.0.0b2 (beta2)
 New Comment:

sorry, the correct url is http://www.gauffin.org/site.zip


Previous Comments:
------------------------------------------------------------------------

[2003-12-10 07:48:19] jonas at datatal dot se

Description:
------------
Hello

I cant reproduce the bug with a small example, but I get it every time
on my site. I use a Template class to separate the buisiness logic from
the presentation layer.

I got a main template, a menu template and a body template. If I exlude
the menu template or the body template everything works, but if I
include both, i get the following crash: The instruction at
"0x100fe35a" referenced memory at "0x28776f78". The memory could not be
"read".

1. The site can be downloaded from http://www.gauffin.org/site.php
2. Just unzip it and create the testdatabase by using support5.sql
3. surf to http://testsite/case.php?action=list
4. php should crash.

Reproduce code:
---------------
I can zip my site (quite small) and send it to you with instructions
how to reproduce the error.

<?php 
        require_once('config.php');
        require_once('include\general.php');
        require_once('include\adodb\adodb.inc.php');
        require_once('include\Template.php');
        require_once('classes\SessionUser.php');
        require_once('classes\Case.php');
        require_once('classes\UserHandler.php');
        $curUser = new SessionUser;
        
        $conn = &ADONewConnection('mysql'); 
        $conn->PConnect('localhost','root','','support5_v2');
        
        $action = 'list.php';
        if (isset($_GET['action'])) $action = $_GET['action'];
        
        /* @var $handler QueryHandler */
        $handler = new QueryHandler($conn);
        $body = $handler->HandleAction($action);
        
        /* uncommeting these lines will crash php 
        $menuTemplate = new Template('templates\menuSupport.tpl');
        $menuTemplate->Set('curUser', $curUser);
        */
        
        $mainTemplate = new Template('templates\design1.tpl');
        $mainTemplate->Set('body', $body);
        $mainTemplate->Set('title', 'First page');
        $mainTemplate->Set('leftMenu', $menuTemplate);
        $mainTemplate->Set('curUser', $curUser);
        $mainTemplate->Set('rightMenu', 'ingenting');
        echo $mainTemplate->Fetch();
        
        
?>

Expected result:
----------------
No crash? =)

Actual result:
--------------
crash.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26579&edit=1

Reply via email to