ID: 40276 Updated by: [EMAIL PROTECTED] Reported By: zakirov at rain dot ifmo dot ru -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Windows XP Pro SP2 PHP Version: 5.2.0 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2007-01-29 20:02:27] zakirov at rain dot ifmo dot ru Description: ------------ If PHP page uses XTPL library (http://xtpl.sf.net), then writing to $_SESSION causes Apache to crash. Though commenting body of method scan_globals() (class XTemplate) neutralize bug: ... function scan_globals () { reset($GLOBALS); foreach ($GLOBALS as $k => $v) { $GLOB[$k] = $v; } $this->assign('PHP', $GLOB); /* access global variables as {PHP.HTTP_SERVER_VARS.HTTP_HOST} in your template! */ } ... function assign ($name, $val = '') { if (is_array($name)) { foreach ($name as $k => $v) { $this->vars[$k] = $v; } } else { $this->vars[$name] = $val; } } ... Reproduce code: --------------- Download any last version of XTPL library from http://sourceforge.net/project/showfiles.php?group_id=16714 Create test template-file 'test.html': <!-- BEGIN: main --> <html> <head> </head> <body> </body> </html> <!-- END: main --> Create and test php file: <?php require_once('XTemplate.php'); session_start(); $xtpl = new XTemplate('test.html'); $_SESSION['TEST'] = "test"; ?> Expected result: ---------------- Expected no errors. Actual result: -------------- Apache crashes. Windows shows popup: "Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience." Error signature: szAppName: httpd.exe szAppVer: 2.2.4.0 szModName: php5ts.dll szModVer: 5.2.0.0 offset: 00098178 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40276&edit=1