I noticed the same problem on 9.04 32 bit headless server version on 64 bit 
dual core machine:
///////////////////////////////////////////////////////////////////
Oct  1 22:35:35 fiskeryd kernel: [117903.467192] php-cgi[1167]: segfault at 
b6dc4760 ip b6dc4760 sp b6d3639c error 14 in librt-2.9.so[b70dd000+7000]
Oct  1 22:35:35 fiskeryd kernel: [117903.543668] php-cgi[1174]: segfault at 
b6d3c760 ip b6d3c760 sp b6cae39c error 14 in libpam.so.0.81.12[b6f1d000+a000]
///////////////////////////////////////////////////////////////////

The log for suphp shows for this unique time:
///////////////////////////////////////////////////////////////////
[Thu Oct 01 22:35:35 2009] [info] Executing 
"/var/www/clients/client1/web8/web/webcam/showimg.php" as UID 5009, GID 5003
[Thu Oct 01 22:35:35 2009] [info] Executing 
"/var/www/clients/client1/web8/web/webcam/showimg.php" as UID 5009, GID 5003
///////////////////////////////////////////////////////////////////

There is nothing interesting in Apache2 logs.

However, the showimg.php shows images from from one of many webcams and looks 
like this:
///////////////////////////////////////////////////////////////////
  if( $_REQUEST["img_nocam"] ) {
    if( file_exists( $_REQUEST["ftp_dir"] . "/nocam.jpg" ) ) {
      $nocam = $_REQUEST["ftp_dir"] . "/nocam.jpg";
    } else {
      $nocam = "nocam.png";
    }
  } else {
    $nocam = "nocam.png";
  }


  if( $_REQUEST["img_type"] != "nohead" ) {
    header("Content-type: image/" . $_REQUEST["img_type"] );
    header("Cache-control: no-cache");
    header("Pragma: no-cache");
  }
  if( $_REQUEST["img_file"] && !$_REQUEST["domain"] && !$_REQUEST["port"] ) {
    //
    //  Only a URL is supplied.
    //  So, let's just show this to the user.
    //
    if( $_REQUEST["img_file"] == monitor1 ) {
      $_REQUEST["img_file"] = 
"http://192.168.0.151/cgi-bin/nph-zms?mode=single&monitor=1&scale=100";;
    } else if( $_REQUEST["img_file"] == monitor2 ) {
      $_REQUEST["img_file"] = 
"http://192.168.0.151/cgi-bin/nph-zms?mode=single&monitor=2&scale=100";;
    }
    if( $f = fopen( $_REQUEST["img_file"], "r" ) ) {
      fpassthru( $f );
      fclose( $f );
    } else {
      //
      //  The actual URL didn't work.
      //  So, let's show the user this.
      //
      @readfile( $nocam );
    }
  } else if(  $_REQUEST["img_file"] && $_REQUEST["domain"] && $_REQUEST["port"] 
&&
              $fp = @fsockopen( $_REQUEST["domain"], $_REQUEST["port"], 
$errnum, $errstr, $_REQUEST["socktime"] ) ) {
    fclose($fp);
    //
    //  The above test proves that a connection to the above server is possible 
within the time frame "socktime".
    //  So, let's try with the actual URL.
    //
    if( $_REQUEST["img_type"] != "nohead" ) {
      if( ! @readfile( $_REQUEST["img_file"] ) ) {
        //
        //  The actual URL didn't work.
        //  So, let's show the user this.
        //
        @readfile( $nocam );
      }
    } else {
      if( $f = fopen( $_REQUEST["img_file"], "r" ) ) {
        fpassthru( $f );
        fclose( $f );
      } else {
        //
        //  The actual URL didn't work.
        //  So, let's show the user this.
        //
        @readfile( $nocam );
      }
    }
  } else {
    //
    //  Apparently no URL is supllied.
    //  So, let's show the user this.
    //
    @readfile( $nocam );
  }
///////////////////////////////////////////////////////////////////

Is there anything I can do to put more ligt on the issue?

-- 
php 5.2.6 'random' segfault
https://bugs.launchpad.net/bugs/420389
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to