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

DFP2 Not uploading image

Thread began 5/20/2009 11:39 am by mike264653 | Last modified 5/20/2009 3:20 pm by Ray Borduin | 1514 views | 6 replies |

mike264653

DFP2 Not uploading image

I am running DFP 2 with DW CS4 on a mac using MAMP as a testing server. I created a database in MySQL and my admin pages with DataAssist 2.0.4 using the DA Wizard.
I reviewed the DFP2 PDFs and looked at the DFP1 videos to see if I missed something but I can not get a file to upload. All the data is sent and captured in the db but my folder for my uploaded images remains empty. Here is the code for the file.
DFP1 worked great, I can't see whats broken here.
Thanks for any help you can give


<?php require_once("../Connections/frubob_db.php"); ?>
<?php require_once("../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once("../WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "upload_Images/photos/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "1",
'ResizeWidth' => "500",
'ResizeHeight' => "325",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
'UploadFolder' => "upload_Images/thumbs/",
'FileName' => "[FileName]_thumb",
'DefaultFileName' => "",
'ResizeType' => "1",
'ResizeWidth' => "75",
'ResizeHeight' => "50",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)){
WA_DFP_UploadFiles("WA_UploadResult1", "image_name", "0", "", "JPG:80", $WA_UploadResult1_Params);
}
?>
<?php
// WA Application Builder Insert
if (isset($_POST["Insert"])) // Trigger
{
$WA_connection = $frubob_db;
$WA_table = "photo";
$WA_sessionName = "WADA_Insert_photo";
$WA_redirectURL = "photo_Detail.php";
$WA_keepQueryString = false;
$WA_indexField = "photo_id";
$WA_fieldNamesStr = "sender_name|sender_email|image_title|image_name|upload_Date";
$WA_fieldValuesStr = "".((isset($_POST["sender_name"]))?$_POST["sender_name"]:"") ."" . "|" . "".((isset($_POST["sender_email"]))?$_POST["sender_email"]:"") ."" . "|" . "".((isset($_POST["image_title"]))?$_POST["image_title"]:"") ."" . "|" . "".((isset($_POST["image_name"]))?$_POST["image_name"]:"") ."" . "|" . "".((isset($_POST["date"]))?$_POST["date"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,NULL";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_frubob_db;
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);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/AdminTemp.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Insert photo</title>
<!-- InstanceEndEditable -->
<link href="../css/frubob.css" rel="stylesheet" type="text/css" />
<style type="text/css">

</style>
<!-- InstanceBeginEditable name="head" -->
<link href="../WA_DataAssist/styles/Refined_Moab.css" rel="stylesheet" type="text/css" />
<link href="../WA_DataAssist/styles/Tahoma.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
</head>

<body>

<div id="globalContainer">

<?php include("includes/admin_header.inc"); ?>

<div id="middle">

<div id="pic"><img src="../images/side_bg.jpg" width="234" height="474" align="left" /></div>
<div id="content">
<!-- InstanceBeginEditable name="Content" -->

<div class="WADAInsertContainer">
<form action="photo_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">Sender's Name:</th>
<td class="WADADataTableCell"><input type="text" name="sender_name" id="sender_name" value="" size="42" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Sender's Email:</th>
<td class="WADADataTableCell"><input type="text" name="sender_email" id="sender_email" value="" size="42" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Image Title:</th>
<td class="WADADataTableCell"><input type="text" name="image_title" id="image_title" value="" size="42" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Image:</th>
<td class="WADADataTableCell"><input name="image_name" type="file" 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="Submit" class="button" name="Insert" id="Insert" value="Insert" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><span id="Cancel" class="WADATextButton"><a href="photo_Results.php">Cancel</a></span></td>
</tr>
</table>
<input name="WADAInsertRecordID" type="hidden" id="WADAInsertRecordID" value="" />
<input name="date" type="hidden" id="date" value="<?php echo date("Y-m-d") ; ?>" />
</div>
</form>
</div>
<!-- InstanceEndEditable -->
</div>


</div>

</div>
</body>
<!-- InstanceEnd --></html>

Sign in to reply to this post

Ray BorduinWebAssist

Do you have a url where I can view the problem in context?

Sign in to reply to this post

mike264653

Test URL

It is in it's rough stages. Most links are not set yet but the db and upload image are in place.

photo_Insert.php

Sign in to reply to this post

mike264653

I placed an image on the server to see if the coding to display the photo was correct.
I see in the db that you are testing, thank you. here is the entry with the photo added.

photo_Detail.php?photo_id=1

Sign in to reply to this post

Ray BorduinWebAssist

Very odd... Do you have GD2 installed properly on your server? You may want to post a support incident. Does it have troubles if you don't mark it as web images only?

Sign in to reply to this post

mike264653

Sorry my brain is mush right now, I don't know what you mean by GD2...
As far as the web only option, Yes I tried with and without the option selected as well as not resizing the image. Same results, no upload.

Sign in to reply to this post

Ray BorduinWebAssist

Please post a support incident and somebody will debug this with you. I can't imagine what it could be.

GD is the php library we use to resize images: gd


I thought it might be the reason why the image wasn't created properly. However it shouldn't be used when the option of images only isn't selected, so that would probably rule that out as the cause.

Sign in to reply to this post

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...