close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Download file error

Thread begun 7/01/2012 2:52 pm by nickj | Last modified 7/02/2012 10:37 am by Jason Byrnes | 1468 views | 1 replies |

nickj

Download file error

I've used the file download successfully on other pages but now it just wants to download the page rather than the file.

The first code download the file correctly but the but the download behavior fails!

<a href="../vTskb28R01a/<?php echo htmlspecialchars($row_WADAcmes['upload_cmeRC']); ?>"><?php echo htmlspecialchars($row_WADAcmes['upload_cmeRC']); ?></a>

<?php
WA_DFP_SetupDownloadStatusStruct("WA_DownloadResult1");
if(isset($_POST["downloadReCert"]) || isset($_POST["downloadReCert_x"])){
WA_DFP_DownloadFile("WA_DownloadResult1", "../../BU/vTskb28R01a/reCert/".$_SESSION['idRc'] ."/", "".$row_WADAcmes['upload_cme'] ."", "[FileName]", false, false, false, "", "", "", "");
}
?>

Here is the button

<input type="submit" name="downloadReCert" id="downloadReCert" value="Download" />

Sign in to reply to this post

Jason ByrnesWebAssist

could be a php error occurring, or it could be the session is not visible. try adding the following code at line 1:

php:
<?php

@session_start();
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
Sign in to reply to this post

nickj

New issue

The download seems to work well with files under say 1 meg, but files over say 2 megs download damaged! This appears to be file size issue.

Any thoughts?

Nick

Sign in to reply to this post

Jason ByrnesWebAssist

you will need to update the php.ini file on the server to increase the Memory_limit Max_execution_time settings to allow enough time and memory for the larger file to download.

Sign in to reply to this post

nickj

Here is my PHP.INI output, what would your recommend the settings to be?

lude_path .:/usr/lib/php:/usr/local/lib/php .:/usr/lib/php:/usr/local/lib/php
log_errors On On
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 300 300
max_file_uploads 20 20
max_input_nesting_level 64 64
max_input_time 18000 18000
memory_limit 128M 128M
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 128M 128M
precision 12 12
realpath_cache_size 16K 16K

Sign in to reply to this post

Jason ByrnesWebAssist

those settings look like they should work, but really it depends on your connection speed and how long it takes your host to send the file to your system.

try adding this at line 1 of the page:

php:
<?php set_time_limit(0); ?>
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...