From: errol at issi dot co dot za Operating system: Linux 2.6.20 on ARM PHP version: 5.2.1 PHP Bug Type: CGI related Bug description: Sgementation fault
Description: ------------ I was running 5.0.4 (cgi) on an ARM processor (embedded) with linux 2.4.27 and it worked successfully. I have now upgraded to linux 2.6.20 and PHP 5.2.1 (cgi) and I now get a segmentation fault on some of my scripts that previously worked. I have no gdb on the embedded system and have not been able to reproduce the problem on my SuSE linux systems. Reproduce code: --------------- Part of code ... <table> <?php exec("/usr/sbin/ntpq -c peers",$result); while (list($key,$value) = each($result)){ $table = split(" *",trim($value)); if ($key == 0){ echo "<tr>"; echo "<th>Reference</th>"; echo "<th>$table[0]</th>"; echo "<th>$table[1]</th>"; echo "<th>$table[2]</th>"; echo "<th>$table[3]</th>"; echo "<th>$table[4]</th>"; echo "<th>$table[5]</th>"; echo "<th>$table[6]</th>"; echo "<th>$table[7]</th>"; echo "<th>$table[8]</th>"; echo "<th>$table[9]</th>"; echo "</tr>"; Expected result: ---------------- -bash-3.2# ./php -v PHP 5.2.1 (cgi) (built: Feb 23 2007 17:03:34) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies Expected result is a table of values. Actual result: -------------- Result: -bash-3.2# ./php ../htdocs/ntp.php X-Powered-By: PHP/5.2.1 Content-type: text/html <!-- #*********************************************************************** # Integrated Seismic System # ========================= # # $Id: ntp.php,v 1.9 2006/07/11 09:11:41 issd Exp $ # #*********************************************************************** # # All rights reserved. Copyright by ISS International Ltd., 1988-2003. # # No reproduction of this computer program in whole or in part, in # any form, by any electronic, mechanical or other means is permitted # without the written permission of ISS International Limited. # # END OF RCS HEADER --> <html> <head> <title>Seismic Controller</title> <link href="controller.css" rel="stylesheet"/> <script src="javascript/issupdate.js"></script> <!-- <meta content="30" http-equiv="Refresh"/>--> </head> <body onload=setTimeout("updateISS('ntp.php',30000)",3000)> <center> <h1>Seismic Controller</h1> <h1> ()</h1> <h2>Tue Feb 27 11:20:54 UTC 2007 </h2> <img src="monitors/images/ISSsmall_logo.png"/> <br/> <table> Segmentation fault -- Edit bug report at http://bugs.php.net/?id=40658&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40658&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40658&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40658&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40658&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40658&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40658&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40658&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40658&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40658&r=support Expected behavior: http://bugs.php.net/fix.php?id=40658&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40658&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40658&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40658&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40658&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40658&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40658&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40658&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40658&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40658&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40658&r=mysqlcfg