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

Blanc pages

Thread began 10/13/2009 1:33 pm by jack107019 | Last modified 10/17/2009 9:00 am by Dave Buchholz | 1491 views | 9 replies |

jack107019

Blanc pages

I have been trying Digital File Pro without much success. Firstly I set this up on my Mac using my testing server. All seemed OK except that nothing uploads or downloads, so thought this might be something to do with the configuration of the local server.
So have run some live test on a testing server via my hosting facility, and whichever way I have tried to configure the page it shows completely blank via either Firefox or Safari. Viewing the source indicates that the page breaks wherever the generated php code falls. I moved it around a few locations, and the supplied documentation falls short of showing how code should be inserted into the document.
I am happy in HTML and CSS but know precious little about php, the literature said I didn't have to know php, but that appears optimistic.
Regards
Jack

Sign in to reply to this post

tom92909Beta Tester

Let's start with your actual upload page...

Do you have a form that looks something like this?

php:
<form  action="" method="post" enctype="multipart/form-data" name="images" id="images1">

          <label> </label>
          <h2>Image Filename to Upload:
            <input type="file" name="images" id="images">
          </h2>
          <input name="Submit" type="submit" id="Submit" value="Submit">
          <input name="Reset" type="reset" id="Reset" value="Reset">
 </form>
Sign in to reply to this post

jack107019

Form type

Hi Tom,
And thank you for replying so quickly,

I have been experimenting so the following is the form information I was using.

<form>
<p>
<input name="upload" type="file" size="50" />
</p>
<p>
<label>
<input type="submit" name="submit" id="submit" value="Submit" />
</label>
</p>
<p>
<input name="download" type="submit" value="download" />
</p>
</form>

I have also pasted the code you sent into a revised version and it makes no difference.

The code that DFP generates is as follows;

<?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' => "uploads/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["submit"])){
WA_DFP_UploadFiles("WA_UploadResult1", "upload", "0", "", "false", $WA_UploadResult1_Params);
}
?>

Which it puts at the very top of the page before anything else, I have tried moving it.

Thanks
Jack

Sign in to reply to this post

Jason ByrnesWebAssist

Your form tag:

html:
<form>




does not set the forms method, or encoding type.


For file uploads to work, the forms encoding type must be set to multipart/form-data. Also, the forms method must be set to post. it's good practice to include an action, name and ID as well:

html:
<form action="" method="post" enctype="multipart/form-data" name="uploadForm" id="uploadForm">



Your form contains two submit buttons:

html:
<input type="submit" name="submit" id="submit" value="Submit" />
</label>
</p>
<p>
<input name="download" type="submit" value="download" />




Digital File Pro is set to trigger on the one name d submit:

html:
<input type="submit" name="submit" id="submit" value="Submit" />






  Viewing the source indicates that the page breaks wherever the generated php code falls.  



can you provide the text of the error when you view the source? The code should go at the top, so to tell what is going wrong, we will need to know the error.

Sign in to reply to this post

tom92909Beta Tester

Hi :)

This is a requirement, not an option...

html:
<form action="" method="post" enctype="multipart/form-data">
Sign in to reply to this post

jack107019

Blanc pages

Many thanks Tom and Jason,
I have now have this working just fine now.
Should not do this sort of thing after a long day!!
Help appreciated.
Jack

Sign in to reply to this post

martin389853

I also have a white page. There is no error report because the page is broken by the php code. When I take the php code out the page loads fine. Pity Jack didn't say how he fixed his problem.

I've commented out these two lines ..

//virtual("/WA_DigitalFilePro/HelperPHP.php");

//WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");

and the page loads. If either of those lines are not commented out the page fails to load. Any ideas?

Sign in to reply to this post

Dave BuchholzBeta Tester

Originally Said By: martin389853
  //virtual("/WA_DigitalFilePro/HelperPHP.php");

//WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");  



Martin,

those lines should read

require_once("/WA_DigitalFilePro/HelperPHP.php");

WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");



Dreamweaver will use virtual() instead of require_once() if the Create Links Relative To option is set to Site in your site definition, try changing it to Document

Sign in to reply to this post

martin389853

Thank you. That worked. I should also point out that when I looked at the require_once("/WA_DigitalFilePro/HelperPHP.php"); code and asked myself why that was pointing to another file on the same web server. Realising this I then saw the folder in my local directory (which I hadn't read in the instructions would magically appear in the background site structure). I uploaded the WA_DigitalFilePro folder along with the edited file updating your changes and now the page works.

Thankyou.

Sign in to reply to this post

Dave BuchholzBeta Tester

No problem, you will find that most if not all WA Server Behaviours will create a folder containing the necessary helper files which are required to be uploaded to your server.

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