close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

digital file uploads not working

Thread began 5/15/2012 9:17 am by sean366869 | Last modified 5/15/2012 10:02 am by Jason Byrnes | 1900 views | 6 replies |

sean366869

digital file uploads not working

I have been through the support section, made sure all my bases were covered, but still have gotten nowhere with the file upload function. Simple page, 1 form, a file form and 2 buttons. No error messages come up, but the file doesnt upload. The php.ini file is good. Filesize is not a problem, and it is set to accept uploads. The target folder permissions are set to read write and execute, but to no avail.
Here is the page.

<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["submit"])){
WA_DFP_UploadFile("WA_UploadResult1", "upload", "client_upload", "/uploads", "[FileName]", "0", "[FileName]_[Increment]", "24000", "false", "0", "0");
}
?><!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>upload page</title>
</head>

<body>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<label>
<div align="center">Upload File
<input type="file" name="upload" id="upload" />
&nbsp;&nbsp;&nbsp;&nbsp;</div>
</label>
<p align="center">
<label></label>
<input type="submit" name="submit" id="submit" value="Submit" />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" name="reset" id="reset" value="Reset" />
</p>
</form>
</body>
</html>

Please let me know what i am missing.

Thanks

Sean

Sign in to reply to this post

Jason ByrnesWebAssist

to help troubleshoot:

1) Add the following code at line 1:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>




2) open the bindings panel, expand the WA Uploaded files Global Status group and add the debug info binding to your page.


3) then add the following code just before the </body> tag:

php:
<?php

echo("POST:<pre>");
var_dump($_POST);
echo(
"</pre>");
echo(
"FILES:<pre>");
var_dump($_FILES);
echo(
"</pre>");
?>



post back the results after trying to upload a file

Sign in to reply to this post

sean366869

Obviously have some issues here.

Warning: mkdir() [function.mkdir]: Permission denied in /home/seanmccleery/public_html/Troop-215/WA_DigitalFilePro/HelperPHP.php on line 22

Warning: mkdir() [function.mkdir]: Permission denied in /home/seanmccleery/public_html/Troop-215/WA_DigitalFilePro/HelperPHP.php on line 22

Warning: move_uploaded_file(/1-11-09.pptx) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/seanmccleery/public_html/Troop-215/WA_DigitalFilePro/HelperPHP.php on line 145

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpcrULXD' to '/1-11-09.pptx' in /home/seanmccleery/public_html/Troop-215/WA_DigitalFilePro/HelperPHP.php on line 145

Upload File


POST:
array(1) {
["submit"]=>
string(6) "Submit"
}

FILES:
array(1) {
["upload"]=>
array(5) {
["name"]=>
string(12) "1-11-09.pptx"
["type"]=>
string(73) "application/vnd.openxmlformats-officedocument.presentationml.presentation"
["tmp_name"]=>
string(14) "/tmp/phpcrULXD"
["error"]=>
int(0)
["size"]=>
int(110451)
}
}

Sign in to reply to this post

Jason ByrnesWebAssist

this means that the /uploads folder does not exist, and it does not have the proper permissions to create it.

note that is going to try to create the uploads folder at the root of the site since you are using a site relative path:

uplaods

Sign in to reply to this post

sean366869

i'm looking at the folder right now. I can change it manually to not be site relative. I'll let you know.
Thanks

Sign in to reply to this post

sean366869

fixed

I set the folder in the root, and it works. Now i know what to do if i want to move the folder. Thanks for the help

Sean

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

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