ID:               40658
 Updated by:       [EMAIL PROTECTED]
 Reported By:      errol at issi dot co dot za
-Status:           Open
+Status:           Feedback
 Bug Type:         CGI related
 Operating System: Linux 2.6.20 on ARM
 PHP Version:      5.2.1
 New Comment:

Well, I don't have an ARM system either. 
So I really doubt we can fix something we can't reproduce and there is
no backtrace.



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

[2007-02-27 12:45:00] errol at issi dot co dot za

I cannot generate a backtrace as I do not have gdb on the embedded ARM
system. I have also been unable to reproduce the problem on a system
where I have gdb.

I have been able to islolate the problem to this line of code.

while (list($key,$value) = each($result)){

I have checked and $result is a valid array of values.

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

[2007-02-27 12:31:20] [EMAIL PROTECTED]

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
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php 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.



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

[2007-02-27 11:23:59] errol at issi dot co dot za

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 this bug report at http://bugs.php.net/?id=40658&edit=1

Reply via email to