The IT dept. at the university came back and said that the TMP directory was enabled for server writing. I now get a series of errors when I try to submit a photo via my update page:
Warning: mkdir() [function.mkdir]: Permission denied in /web/1/manoa.hawaii.edu/ctahr/tpss/webassist/file_manipulation/helperphp.php on line 30
Warning: mkdir() [function.mkdir]: No such file or directory in /web/1/manoa.hawaii.edu/ctahr/tpss/webassist/file_manipulation/helperphp.php on line 30
Warning: mkdir() [function.mkdir]: No such file or directory in /web/1/manoa.hawaii.edu/ctahr/tpss/webassist/file_manipulation/helperphp.php on line 30
Warning: mkdir() [function.mkdir]: No such file or directory in /web/1/manoa.hawaii.edu/ctahr/tpss/webassist/file_manipulation/helperphp.php on line 30
Warning: move_uploaded_file(/web/1/manoa.hawaii.edu/ctahr/tpss/admin/../tpss/wp-content/uploads/photos/75fac29fb74cdaa7eae952fde30d8a2e_tmp.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /web/1/manoa.hawaii.edu/ctahr/tpss/webassist/file_manipulation/helperphp.php on line 96
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/var/tmp/phpG7aiBi' to '/web/1/manoa.hawaii.edu/ctahr/tpss/admin/../tpss/wp-content/uploads/photos/75fac29fb74cdaa7eae952fde30d8a2e_tmp.jpg' in /web/1/manoa.hawaii.edu/ctahr/tpss/webassist/file_manipulation/helperphp.php on line 96
Warning: copy(/web/1/manoa.hawaii.edu/ctahr/tpss/admin/../tpss/wp-content/uploads/photos/75fac29fb74cdaa7eae952fde30d8a2e_tmp.jpg) [function.copy]: failed to open stream: No such file or directory in /web/1/manoa.hawaii.edu/ctahr/tpss/webassist/file_manipulation/helperphp.php on line 98
Here's the server code for my page:
<?php
$Paramid_WADAfaculty = "-1";
if (isset($_GET['id'])) {
$Paramid_WADAfaculty = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
mysql_select_db($database_connTPSS, $connTPSS);
$query_WADAfaculty = sprintf("SELECT * FROM faculty WHERE id = %s", GetSQLValueString($Paramid_WADAfaculty, "int"));
$WADAfaculty = mysql_query($query_WADAfaculty, $connTPSS) or die(mysql_error());
$row_WADAfaculty = mysql_fetch_assoc($WADAfaculty);
$totalRows_WADAfaculty = mysql_num_rows($WADAfaculty);?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../tpss/wp-content/uploads/photos",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "150",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End?>
<?php
// WA_UploadResult2 Params Start
$WA_UploadResult2_Params = array();
// WA_UploadResult2_1 Start
$WA_UploadResult2_Params["WA_UploadResult2_1"] = array(
'UploadFolder' => "../tpss/wp-content/uploads/photos",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult2_1 End
// WA_UploadResult2 Params End
?>
<?php?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Update_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "photo", "0", "", "true", $WA_UploadResult1_Params);
}?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult2");
if(isset($_POST["Update_x"])){
WA_DFP_UploadFiles("WA_UploadResult2", "publicationLink", "0", "", "false", $WA_UploadResult2_Params);
}?>
<?php
// WA Application Builder Update
if (isset($_POST["Update_x"])) // Trigger
{
$WA_connection = $connTPSS;
$WA_table = "faculty";
// $WA_redirectURL = "faculty_Detail.php?id=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_indexField = "id";
$WA_fieldNamesStr = "firstName|middleName|lastName|title|officeLocation|officeStreet|officeStreet2|officeCity|officeState|officeZip|officeHours|officePhone|officeFax|email|bio|specialities|education|researchInterest|photo|pub1|pub2|pub3|pub4|pub5|pub6|pub7|pub8|pub9|pub10|publicationLink";
$WA_fieldValuesStr = "".((isset($_POST["firstName"]))?$_POST["firstName"]:"") ."" . "|" . "".((isset($_POST["middleName"]))?$_POST["middleName"]:"") ."" . "|" . "".((isset($_POST["lastName"]))?$_POST["lastName"]:"") ."" . "|" . "".((isset($_POST["title"]))?$_POST["title"]:"") ."" . "|" . "".((isset($_POST["officeLocation"]))?$_POST["officeLocation"]:"") ."" . "|" . "".((isset($_POST["officeStreet"]))?$_POST["officeStreet"]:"") ."" . "|" . "".((isset($_POST["officeStreet2"]))?$_POST["officeStreet2"]:"") ."" . "|" . "".((isset($_POST["officeCity"]))?$_POST["officeCity"]:"") ."" . "|" . "".((isset($_POST["officeState"]))?$_POST["officeState"]:"") ."" . "|" . "".((isset($_POST["officeZip"]))?$_POST["officeZip"]:"") ."" . "|" . "".((isset($_POST["officeHours"]))?$_POST["officeHours"]:"") ."" . "|" . "".((isset($_POST["officePhone"]))?$_POST["officePhone"]:"") ."" . "|" . "".((isset($_POST["officeFax"]))?$_POST["officeFax"]:"") ."" . "|" . "".((isset($_POST["email"]))?$_POST["email"]:"") ."" . "|" . "".((isset($_POST["bio"]))?$_POST["bio"]:"") ."" . "|" . "".((isset($_POST["specialities"]))?$_POST["specialities"]:"") ."" . "|" . "".((isset($_POST["education"]))?$_POST["education"]:"") ."" . "|" . "".((isset($_POST["researchInterest"]))?$_POST["researchInterest"]:"") ."" . "|" . "".((isset($_FILES["photo"]))?$_FILES["photo"]["name"]:"") ."" . "|" . "".((isset($_POST["pub1"]))?$_POST["pub1"]:"") ."" . "|" . "".((isset($_POST["pub2"]))?$_POST["pub2"]:"") ."" . "|" . "".((isset($_POST["pub3"]))?$_POST["pub3"]:"") ."" . "|" . "".((isset($_POST["pub4"]))?$_POST["pub4"]:"") ."" . "|" . "".((isset($_POST["pub5"]))?$_POST["pub5"]:"") ."" . "|" . "".((isset($_POST["pub6"]))?$_POST["pub6"]:"") ."" . "|" . "".((isset($_POST["pub7"]))?$_POST["pub7"]:"") ."" . "|" . "".((isset($_POST["pub8"]))?$_POST["pub8"]:"") ."" . "|" . "".((isset($_POST["pub9"]))?$_POST["pub9"]:"") ."" . "|" . "".((isset($_POST["pub10"]))?$_POST["pub10"]:"") ."" . "|" . "".((isset($_FILES["publicationLink"]))?$_FILES["publicationLink"]["name"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
$WA_comparisonStr = "=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_where_fieldValuesStr = "".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";
$WA_where_columnTypesStr = "none,none,NULL";
$WA_where_comparisonStr = "=";
$WA_where_fieldNames = explode("|", $WA_indexField);
$WA_where_fieldValues = explode("|", $WA_where_fieldValuesStr);
$WA_where_columns = explode("|", $WA_where_columnTypesStr);
$WA_where_comparisons = explode("|", $WA_where_comparisonStr);
$WA_connectionDB = $database_connTPSS;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$updateParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WhereObj = WA_AB_generateWhereClause($WA_where_fieldNames, $WA_where_columns, $WA_where_fieldValues, $WA_where_comparisons );
$WA_Sql = "UPDATE `" . $WA_table . "` SET " . $updateParamsObj->WA_setValues . " WHERE " . $WhereObj->sqlWhereClause . "";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>
I really need to solve this problem today. Let me know if I need to move to a support ticket.
Thanks again for your help. - Joe