#32491 [Opn->Fbk]: File upload error

2005-03-29 Thread sniper
 ID:   32491
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Oscar dot Castillo at jpl dot nasa dot gov
-Status:   Open
+Status:   Feedback
 Bug Type: HTTP related
 Operating System: Solaris 9
 PHP Version:  5.0.3
 New Comment:

What compile errors?



Previous Comments:


[2005-03-30 02:15:33] Oscar dot Castillo at jpl dot nasa dot gov

I downloaded the php5-latest.tar.gz, but got compiler errors. I
downloaded the php5-STABLE-200503292230 and was able to compile it. It
is now running good so far. However, the upload problems usually take 2
- 24 hours to begin. I shall continue to monitor. 
Thanks for your help



[2005-03-29 23:39:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





[2005-03-29 21:55:27] Oscar dot Castillo at jpl dot nasa dot gov

Description:

I am using iPlanet 6.0 SP5, Zend 2.5.7 and PHP 5.0.3 on a 64 bit
Solaris 9 SunFire V880 (4x4GHz CPU, 8Gb RAM). I have a problem with an
HTTP POST command that attempts to upload a file onto the web server
and a consistent "File upload error - unable to create a temporary file
in Unknown on line 0" error message appears in the error logs. The
upload_tmp_dir directory is set to /tmp. The error message disappears
with a web server daemon reset (stop/start the web server daemon), but
the error begins to occur within 2 to 24 hours again. When the errors
occur, the /tmp directory begins to accumulate with php[web_server_pid]
files that are zero bytes in size. My upload_max_filesize parameter is
configured to 2Mb, however the uploaded files are never above 50kb.
I've tried many suggested fixes from the php.net bug reports area, but
to no avail. Thanks in advance for your help!

Reproduce code:
---
 9) { phpinfo(); }
//
// Configurable variables
//
  $BaseDir = './';
  $LogFileName = $BaseDir . "RTIU_translator.log";
  $SCLK_SCET_Dir = "/afs/jpl/group/casops/dom/data/main/sclkscet/";  //
placed in executed shell script
  $UploadDir = $BaseDir . "Temp/" ; //  Where the posted files 
are
placed
  $TransferDir = $BaseDir . "Xfer/";//  Where the tar file for the
translator is created

//
// Verify resources are available
//

$LogFile = fopen( $LogFileName,'a');
if (! $LogFile)
{ print("Logging is disabled, please save all displayed messages if
help is needed from IO support");
}

// Verify UPLOAD directory
if (!file_exists($UploadDir))
{ if ($LogFile)
  { $TmpStr = sprintf("%s VERIFY Upload directory does not exist\n",
  gmdate("Y-m-d H:i:s") );
//  strftime("%Y-%m-%d %T"));
fwrite($LogFile, $TmpStr);
  }
  if(!mkdir($UploadDir,0774))
  { DisplayError("Could not create Upload directory",0);
return;
  }
}
// Verify TRANSFER directory
if (!file_exists($TransferDir))
{ if ($LogFile)
  { $TmpStr = sprintf("%s VERIFY Transfer directory does not exist\n",
  gmdate("Y-m-d H:i:s") );
//  strftime("%Y-%m-%d %T"));
fwrite($LogFile, $TmpStr);
  }
  print( "Missing Transfer Directory: $TransferDir ");
  if (!mkdir($TransferDir,0774))
  { DisplayError("Could not create Transfer directory",0);
return;
  }
}

//
// Capture form values
//

$BaseName = escapeshellcmd($_POST['BaseName']);
$SequenceID = $_POST['SequenceID'];
$SCLK_SCET_File = $_POST['SCLK_SCET_File'];
$StartTimeUTC = $_POST['StartTimeUTC'];
$StopTimeUTC = $_POST['StopTimeUTC'];
$InputType = $_POST['input_type'];  // SASF or PRT
$OutputType = $_POST['output_type'];// SEQ or IEB
$UserFileName = $_FILES['UploadFile']['name'];
$StartALF = $_POST['StartALF']; // 0 <= ?
$ALF_Partition = $_POST['ALF_Partition'];   // DEFAULT or NON_DEFAULT
$ALF_Step = $_POST['ALF_Step']; // 4 or 8

$CAS_User = $_SERVER['REMOTE_USER'];
$HostSource = $_SERVER['REMOTE_HOST'];

//
//  Debug stuff (POST data)
//
if ($debug_level > 3)
{ print( "Upload Directory: $UploadDir ");
  print( "SCLK/SCET Directory: $SCLK_SCET_Dir ");

  if ($debug_level > 8)
  { print ("");
var_dump($_FILES);

var_dump($_POST);
print ("");
  }
  print( "Input Type: $InputType ");
  print( "Basename: $BaseName ");
  print( "Upload File: $UserFileName ");
  print( "Sequence ID: $SequenceID ");
  print( "SCLK/SCET File: $SCLK_SCET_File ");
  print( "Start UTC: $StartTimeUTC ");
  print( "Stop UTC: $StopTimeUTC ");

  print( "Output Type: $OutputType ");
  print( "Start ALF: $StartALF ");
  print( "Partition: $ALF_Partition ");
  print( "ALF Step: $ALF_Step ");
}

//
// Verify parameter values
//
print("Processing an $In

#32491 [Opn->Fbk]: File upload error

2005-03-29 Thread sniper
 ID:   32491
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Oscar dot Castillo at jpl dot nasa dot gov
-Status:   Open
+Status:   Feedback
-Bug Type: *Configuration Issues
+Bug Type: HTTP related
 Operating System: Solaris 9
 PHP Version:  5.0.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:


[2005-03-29 21:55:27] Oscar dot Castillo at jpl dot nasa dot gov

Description:

I am using iPlanet 6.0 SP5, Zend 2.5.7 and PHP 5.0.3 on a 64 bit
Solaris 9 SunFire V880 (4x4GHz CPU, 8Gb RAM). I have a problem with an
HTTP POST command that attempts to upload a file onto the web server
and a consistent "File upload error - unable to create a temporary file
in Unknown on line 0" error message appears in the error logs. The
upload_tmp_dir directory is set to /tmp. The error message disappears
with a web server daemon reset (stop/start the web server daemon), but
the error begins to occur within 2 to 24 hours again. When the errors
occur, the /tmp directory begins to accumulate with php[web_server_pid]
files that are zero bytes in size. My upload_max_filesize parameter is
configured to 2Mb, however the uploaded files are never above 50kb.
I've tried many suggested fixes from the php.net bug reports area, but
to no avail. Thanks in advance for your help!

Reproduce code:
---
 9) { phpinfo(); }
//
// Configurable variables
//
  $BaseDir = './';
  $LogFileName = $BaseDir . "RTIU_translator.log";
  $SCLK_SCET_Dir = "/afs/jpl/group/casops/dom/data/main/sclkscet/";  //
placed in executed shell script
  $UploadDir = $BaseDir . "Temp/" ; //  Where the posted files 
are
placed
  $TransferDir = $BaseDir . "Xfer/";//  Where the tar file for the
translator is created

//
// Verify resources are available
//

$LogFile = fopen( $LogFileName,'a');
if (! $LogFile)
{ print("Logging is disabled, please save all displayed messages if
help is needed from IO support");
}

// Verify UPLOAD directory
if (!file_exists($UploadDir))
{ if ($LogFile)
  { $TmpStr = sprintf("%s VERIFY Upload directory does not exist\n",
  gmdate("Y-m-d H:i:s") );
//  strftime("%Y-%m-%d %T"));
fwrite($LogFile, $TmpStr);
  }
  if(!mkdir($UploadDir,0774))
  { DisplayError("Could not create Upload directory",0);
return;
  }
}
// Verify TRANSFER directory
if (!file_exists($TransferDir))
{ if ($LogFile)
  { $TmpStr = sprintf("%s VERIFY Transfer directory does not exist\n",
  gmdate("Y-m-d H:i:s") );
//  strftime("%Y-%m-%d %T"));
fwrite($LogFile, $TmpStr);
  }
  print( "Missing Transfer Directory: $TransferDir ");
  if (!mkdir($TransferDir,0774))
  { DisplayError("Could not create Transfer directory",0);
return;
  }
}

//
// Capture form values
//

$BaseName = escapeshellcmd($_POST['BaseName']);
$SequenceID = $_POST['SequenceID'];
$SCLK_SCET_File = $_POST['SCLK_SCET_File'];
$StartTimeUTC = $_POST['StartTimeUTC'];
$StopTimeUTC = $_POST['StopTimeUTC'];
$InputType = $_POST['input_type'];  // SASF or PRT
$OutputType = $_POST['output_type'];// SEQ or IEB
$UserFileName = $_FILES['UploadFile']['name'];
$StartALF = $_POST['StartALF']; // 0 <= ?
$ALF_Partition = $_POST['ALF_Partition'];   // DEFAULT or NON_DEFAULT
$ALF_Step = $_POST['ALF_Step']; // 4 or 8

$CAS_User = $_SERVER['REMOTE_USER'];
$HostSource = $_SERVER['REMOTE_HOST'];

//
//  Debug stuff (POST data)
//
if ($debug_level > 3)
{ print( "Upload Directory: $UploadDir ");
  print( "SCLK/SCET Directory: $SCLK_SCET_Dir ");

  if ($debug_level > 8)
  { print ("");
var_dump($_FILES);

var_dump($_POST);
print ("");
  }
  print( "Input Type: $InputType ");
  print( "Basename: $BaseName ");
  print( "Upload File: $UserFileName ");
  print( "Sequence ID: $SequenceID ");
  print( "SCLK/SCET File: $SCLK_SCET_File ");
  print( "Start UTC: $StartTimeUTC ");
  print( "Stop UTC: $StopTimeUTC ");

  print( "Output Type: $OutputType ");
  print( "Start ALF: $StartALF ");
  print( "Partition: $ALF_Partition ");
  print( "ALF Step: $ALF_Step ");
}

//
// Verify parameter values
//
print("Processing an $InputType upload");

//
//  Log an attempted posting (user & host)
//
if ($LogFile)
{ $TmpStr = sprintf("%s REQUEST (%s) %s from %s\n",
//strftime("%Y-%m-%d %T"), $BaseName, $CAS_User,
$HostSource);
gmdate("Y-m-d H:i:s"), $BaseName, $CAS_User,
$HostSource);
  fwrite($LogFile, $TmpStr);
}
  
// Check Basename
if (strlen($BaseName) == 0)
{ DisplayError("Basename must be specified to translate a
sequence",0);
  return;
} else
{ if (strlen($BaseName) != 6)
  { DisplayError("Base