close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

No File Uploaded: Help please

Thread began 5/19/2009 7:40 pm by dreamweaver41056 | Last modified 5/27/2009 3:22 pm by dreamweaver41056 | 6340 views | 31 replies |

dreamweaver41056

No File Uploaded: Help please

DW CS4 applied DFP 2.0 upload behavior to WA insert form with a file field. Permissions are correct on image directory.

Uploaded the updated DFP 2.0 directory to the server.

It writes the file name to the db but uploads nothing. No errors in the page or server side (checked error log).

Have checked form for errors and have reapplied behavior several different ways, each time re-uploading the library files

DFP1 always uploaded without problem.

Sign in to reply to this post

Ray BorduinWebAssist

This is very odd. Maybe post a support incident. It thinks that it uploaded the file, so it probably did. Somehow it may be uploading to a different directory than you expect, or the file is getting deleted... I'm really not sure because this is not a known issue, but we are very interested in reproducing the problem and finding out what might be the cause.

You could also try posting the code for the upload here and I can look at it to see if I can spot an issue. There isn't much to go on with your description other than it doesn't work.

Sign in to reply to this post

dreamweaver41056

insert form code

<form action="products_Insert.php" method="post" name="WADAInsertForm" id="WADAInsertForm">
<div class="WADAHeader">Insert Record</div>
<div class="WADAHorizLine"><img src="../WA_DataAssist/images/_tx_.gif" alt="" height="1" width="1" border="0" /></div>
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<th class="WADADataTableHeader">Name:</th>
<td class="WADADataTableCell"><input type="text" name="ProdName" id="ProdName" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Short Desc:</th>
<td class="WADADataTableCell"><textarea name="ProdShortDesc" id="ProdShortDesc" cols="32"></textarea></td>
</tr>
<tr>
<th class="WADADataTableHeader">Long Desc:</th>
<td class="WADADataTableCell"><textarea name="ProdLongDesc" id="ProdLongDesc" cols="32"></textarea></td>
</tr>
<tr>
<th class="WADADataTableHeader"> Price:</th>
<td class="WADADataTableCell"><input type="text" name="ProdPrice" id="ProdPrice" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">SKU:</th>
<td class="WADADataTableCell"><input type="text" name="ProdSKU" id="ProdSKU" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Thumb:</th>
<td class="WADADataTableCell"><input type="text" name="ProdThumb" id="ProdThumb" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Image:</th>
<td class="WADADataTableCell"><input type="file" name="ProdImage" id="ProdImage" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">ProdCatID:</th>
<td class="WADADataTableCell">
<select name="ProdCatID" id="ProdCatID">
<?php
do {
?>
<option value="<?php echo $row_WADADynListprodcategory['CatID']?>"><?php echo $row_WADADynListprodcategory['CatName']?></option>
<?php
} while ($row_WADADynListprodcategory = mysql_fetch_assoc($WADADynListprodcategory));
$rows = mysql_num_rows($WADADynListprodcategory);
if($rows > 0) {
mysql_data_seek($WADADynListprodcategory, 0);
$row_WADADynListprodcategory = mysql_fetch_assoc($WADADynListprodcategory);
}
?>
</select>
</td>
</tr>
<tr>
<th class="WADADataTableHeader">Weight:</th>
<td class="WADADataTableCell"><input type="text" name="ProdWeight" id="ProdWeight" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Disc Min:</th>
<td class="WADADataTableCell"><input type="text" name="ProdDiscMin" id="ProdDiscMin" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Disc Price:</th>
<td class="WADADataTableCell"><input type="text" name="ProdDiscPrice" id="ProdDiscPrice" value="" size="32" /></td>
</tr>
</table>
<div class="WADAHorizLine"><img src="../WA_DataAssist/images/_tx_.gif" alt="" height="1" width="1" border="0" /></div>
<div class="WADAButtonRow">
<table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="WADADataNavButtonCell" nowrap="nowrap"><input type="image" name="Insert" id="Insert" value="Insert" alt="Insert" src="../WA_DataAssist/images/Pacifica/Refined_insert.gif" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><a href="products_Results.php" title="Cancel"><img border="0" name="Cancel" id="Cancel" alt="Cancel" src="../WA_DataAssist/images/Pacifica/Refined_cancel.gif" /></a></td>
</tr>
</table>
<input name="WADAInsertRecordID" type="hidden" id="WADAInsertRecordID" value="" />
</div>
</form>

Sign in to reply to this post

fragop363190

Go up in the php code and copy/paste the uploads behavior's Parameters plz.

Sign in to reply to this post

dreamweaver41056

upload params

<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../prodimages/",
'FileName' => "[FileName]",
'DefaultFileName' => "clear.gif",
'ResizeType' => "2",
'ResizeWidth' => "450",
'ResizeHeight' => "0",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "ProdImage", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

Please post all of the code above the html in context. That might allow me to spot the problem.

Sign in to reply to this post

dreamweaver41056

php code

<?php require_once("../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once('../Connections/handbagsWA.php'); ?>
<?php require_once("../WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFile("WA_UploadResult1", "ProdImage", "../prodimages/clear.gif", "../prodpix/", "[FileName]", "2", "[FileName]_[Increment]", "0", "false", "0", "0");
}
?>

<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $handbagsWA;
$WA_table = "products";
$WA_sessionName = "WADA_Insert_products";
$WA_redirectURL = "product_Results.php";
$WA_keepQueryString = false;
$WA_indexField = "ProdID";
$WA_fieldNamesStr = "ProdID|ProdName|ProdShortDesc|ProdLongDesc|ProdPrice|ProdSKU|ProdThumb|ProdImage|ProdWeight|ProdDiscMin|ProdDiscPrice";
$WA_fieldValuesStr = "".((isset($_POST["ProdID"]))?$_POST["ProdID"]:"") ."" . "|" . "".((isset($_POST["ProdName"]))?$_POST["ProdName"]:"") ."" . "|" . "".((isset($_POST["ProdShortDesc"]))?$_POST["ProdShortDesc"]:"") ."" . "|" . "".((isset($_POST["ProdLongDesc"]))?$_POST["ProdLongDesc"]:"") ."" . "|" . "".((isset($_POST["ProdPrice"]))?$_POST["ProdPrice"]:"") ."" . "|" . "".((isset($_POST["ProdSKU"]))?$_POST["ProdSKU"]:"") ."" . "|" . "".((isset($_POST["ProdThumb"]))?$_POST["ProdThumb"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".((isset($_POST["ProdWeight"]))?$_POST["ProdWeight"]:"") ."" . "|" . "".((isset($_POST["ProdDiscMin"]))?$_POST["ProdDiscMin"]:"") ."" . "|" . "".((isset($_POST["ProdDiscPrice"]))?$_POST["ProdDiscPrice"]:"") ."";
$WA_columnTypesStr = "none,none,NULL|',none,''|',none,''|',none,''|none,none,NULL|',none,''|',none,''|',none,''|none,none,NULL|none,none,NULL|none,none,NULL";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_handbagsWA;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
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);
}
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>

Sign in to reply to this post

dreamweaver41056

Wrong page code: use this instead

<?php require_once("../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once('../Connections/handbagsWA.php'); ?>
<?php require_once("../WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
$maxRows_WADADynListprodcategory = 1000;
$pageNum_WADADynListprodcategory = 0;
if (isset($_GET['pageNum_WADADynListprodcategory'])) {
$pageNum_WADADynListprodcategory = $_GET['pageNum_WADADynListprodcategory'];
}
$startRow_WADADynListprodcategory = $pageNum_WADADynListprodcategory * $maxRows_WADADynListprodcategory;

mysql_select_db($database_handbagsWA, $handbagsWA);
$query_WADADynListprodcategory = "SELECT CatID, CatName FROM prodcategory ORDER BY CatName";
$query_limit_WADADynListprodcategory = sprintf("%s LIMIT %d, %d", $query_WADADynListprodcategory, $startRow_WADADynListprodcategory, $maxRows_WADADynListprodcategory);
$WADADynListprodcategory = mysql_query($query_limit_WADADynListprodcategory, $handbagsWA) or die(mysql_error());
$row_WADADynListprodcategory = mysql_fetch_assoc($WADADynListprodcategory);

if (isset($_GET['totalRows_WADADynListprodcategory'])) {
$totalRows_WADADynListprodcategory = $_GET['totalRows_WADADynListprodcategory'];
} else {
$all_WADADynListprodcategory = mysql_query($query_WADADynListprodcategory);
$totalRows_WADADynListprodcategory = mysql_num_rows($all_WADADynListprodcategory);
}
$totalPages_WADADynListprodcategory = ceil($totalRows_WADADynListprodcategory/$maxRows_WADADynListprodcategory)-1;?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../prodimages/",
'FileName' => "[FileName]",
'DefaultFileName' => "clear.gif",
'ResizeType' => "2",
'ResizeWidth' => "450",
'ResizeHeight' => "0",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "ProdImage", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $handbagsWA;
$WA_table = "products";
$WA_sessionName = "WADA_Insert_products";
$WA_redirectURL = "products_Detail.php";
$WA_keepQueryString = false;
$WA_indexField = "ProdID";
$WA_fieldNamesStr = "ProdName|ProdShortDesc|ProdLongDesc|ProdPrice|ProdSKU|ProdThumb|ProdImage|ProdCatID|ProdWeight|ProdDiscMin|ProdDiscPrice";
$WA_fieldValuesStr = "".((isset($_POST["ProdName"]))?$_POST["ProdName"]:"") ."" . "|" . "".((isset($_POST["ProdShortDesc"]))?$_POST["ProdShortDesc"]:"") ."" . "|" . "".((isset($_POST["ProdLongDesc"]))?$_POST["ProdLongDesc"]:"") ."" . "|" . "".((isset($_POST["ProdPrice"]))?$_POST["ProdPrice"]:"") ."" . "|" . "".((isset($_POST["ProdSKU"]))?$_POST["ProdSKU"]:"") ."" . "|" . "".((isset($_POST["ProdThumb"]))?$_POST["ProdThumb"]:"") ."" . "|" . "".((isset($_POST["ProdImage"]))?$_POST["ProdImage"]:"") ."" . "|" . "".((isset($_POST["ProdCatID"]))?$_POST["ProdCatID"]:"") ."" . "|" . "".((isset($_POST["ProdWeight"]))?$_POST["ProdWeight"]:"") ."" . "|" . "".((isset($_POST["ProdDiscMin"]))?$_POST["ProdDiscMin"]:"") ."" . "|" . "".((isset($_POST["ProdDiscPrice"]))?$_POST["ProdDiscPrice"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|none,none,NULL|',none,''|',none,''|',none,''|none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_handbagsWA;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
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);
}
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>

Sign in to reply to this post

dreamweaver41056

Please ignore first PHP code post

Please ignore the first PHP code post. That was from a working DFP1 page that I built in CS3.

The second code paste is from the non-functioning DFP2/ CS4 page.

I backed up all of my WA includes for the different iterations as tar files (on the server) so I can flip back and forth.

I am under the gun to complete this project and may need to set up an alternative development site to troubleshoot this issue with DFP2.

Anyway since I can write to the folder using DFP1/CS3 and DW8/MX Kollection proves that this is not a server side issue (not that I ever thought it was).

Sign in to reply to this post

Ray BorduinWebAssist

I still don't see the problem. Please post a support incident and somebody can help you debug this.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...