From:             jonas at datatal dot se
Operating system: win2k
PHP version:      5.0.0b2 (beta2)
PHP Bug Type:     Reproducible crash
Bug description:  Crash

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 bug report at http://bugs.php.net/?id=26579&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26579&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26579&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26579&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26579&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26579&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26579&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26579&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26579&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26579&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26579&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26579&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26579&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26579&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26579&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26579&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26579&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26579&r=float

Reply via email to