close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Upload File Not Working

Thread began 7/10/2010 5:00 am by hbibizadeh396670 | Last modified 7/20/2010 9:41 am by Jason Byrnes | 2680 views | 11 replies |

hbibizadeh396670

Upload File Not Working

I have Been trying to create an upload function on my php page. Although the files and coding seem to be created after I run the software, I am unable to make a sucessful upload.

It does not upload locally, instead it just seems to refesh the page after i Click the upload button.

When I try the upload online the progress bar does appear, however when looking at the "uploads" folder on my server, the uploaded file is not their.

Other then that, I dont have any idea what the issue is and would much appreciate help!

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your page so I can examine the code.

Sign in to reply to this post

hbibizadeh396670

Pages

Hi

I have attached a copy of the pages for you to see. Thanks for the Help.

Attached Files
File_Upload.zip
Sign in to reply to this post

Jason ByrnesWebAssist

i think the validation is failing on the file field.

Change the following line of code:

php:
$WAFV_Errors .= WAValidateRQ((isset($_POST["fieldset_group_Upload_File"])?$_POST["fieldset_group_Upload_File"]:"") . "",true,1);



to:

php:
$WAFV_Errors .= WAValidateRQ((isset($_FILES["fieldset_group_Upload_File"])?$_FILES["fieldset_group_Upload_File"]:"") . "",true,1);
Sign in to reply to this post

hbibizadeh396670

Still not working

I have made the change and its still not working,

To be honest I just want to know why the software does not work, instead of coding. (Which I do not find easy). I have followed the step by step instructions for creating this file upload, and have even used form builder to create the form. I have tested the software on two computers and it does not work on ether. Is it me or the software? I would like to know for future reference.

Sign in to reply to this post

Jason ByrnesWebAssist

there are a number of diffeant things that cause the upload to fail, to trouble shoot, follow these steps:
1) find the following code:

php:
if ($WAFV_Errors != "")  {

    PostResult($WAFV_Redirect,$WAFV_Errors,"index");
  }




and change it to:

php:
if ($WAFV_Errors != "")  {

    die($WAFV_Errors);
    PostResult($WAFV_Redirect,$WAFV_Errors,"index");
  }




2) add the following code at line 1 to turn error reporting on:

php:
<?php

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



3) Open the bindings panel and expand the WA Uploaded Files Global Status group and add the debug info binding to the page.

post back the results after trying an upload, this will help me determine what the cause of the problem is.

Sign in to reply to this post

hbibizadeh396670

Still not working

After adding the requested to the page (The File Upload is still not working.). However, when lunching the page I get this:


Status object: WA_UploadResult1
statusCode : -1
errorMessage :
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that isa the debug info, it will display when the page is first opened.

I need you to post back the debug info after trying to upload a file and any other information that may be displayed on the page.

Do you have a link where I can test the page?

Sign in to reply to this post

hbibizadeh396670

Link

I have uploaded the pages. Although the progress bar appears, the files are not uploaded by the way.

Link:

test.php

Sign in to reply to this post

Jason ByrnesWebAssist

You have the uploaded as test.php, but the forms action is set to post to index.php.

When i submit the form, i can see that the problem is with validation failing, the address inn the bar is index.php?invalid=true


change the forms action to post to the test.php page.
<form enctype="multipart/form-data" class="Cool_Default" id="Default_Cool_Default" name="Default_Cool_Default" method="post" action="test.php">


I would also like to test that your server is properly configured for sessions.

Please upload the sessionTest.php file from the following post and post a link:
showpost.php?p=23826&postcount=2

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