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

Upload failing

Thread began 4/03/2011 1:58 pm by biz295654 | Last modified 4/04/2011 10:55 am by biz295654 | 1515 views | 14 replies |

biz295654

Upload failing

I've successfully used Digital File Pro on many projects. I've printed out code from a form that works, compared line by line to the one I'm having problems with and just can't see a difference. Same server, so not a permissions issue. Set to 755 on receiving folder.

I've redone this form at least 5 times to try to track it down. Stumped.

Attached is a screen shot of the page, stripped down to just the form code. Any ideas most appreciated.

Sign in to reply to this post

biz295654

I may have found the answer in a previous thread...
showthread.php?t=18528

Will see if this will do it...

Sign in to reply to this post

biz295654

OK... comparing the form that was fixed by replacing an empty space

if(isset($_POST["send photo"])){

to

if(isset($_POST["sendphoto"])){

to my current uploader page and instead of seeing this:
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["sendphoto"])){
WA_DFP_UploadFiles("WA_UploadResult1", "fileField", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>

I am seeing this code, which has a different POST area

<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "upload80", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>

So, what am I doing differently. This is an older site where I had used DFP a long time ago, so perhaps I need to delete DFP from this domain and start fresh? Perhaps there is a different version at work here?

Any help, most appreciated.

Sign in to reply to this post

biz295654

OK... I deleted the WA DFP folder, redid the form and it gave me the isset line

<?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' => "../2011sideimages/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["largesubmit"])){
WA_DFP_UploadFiles("WA_UploadResult1", "largeimage", "0", "", "true", $WA_UploadResult1_Params);
}
?>


However, still no luck on the upload tests.

Sign in to reply to this post

Jason ByrnesWebAssist

are there other behaviors on the page like an insert record behavior? If so make sure the other behaviors do not have a redirect set.


also, check for php errors by adding the following code at line 1 of the page:

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




if you need further help, please send a copy of the page in a zip archive so I can see the entire page code in context.

Sign in to reply to this post

biz295654

Thanks... this error:


Warning: move_uploaded_file(/home/virtual/site59/fst/var/www/html/2011administration/../2011sideimages/04267caf8ce7d30d83cf298739f13b82_tmp.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/virtual/site59/fst/var/www/html/WA_DigitalFilePro/HelperPHP.php on line 96

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpnUQDGG' to '/home/virtual/site59/fst/var/www/html/2011administration/../2011sideimages/04267caf8ce7d30d83cf298739f13b82_tmp.jpg' in /home/virtual/site59/fst/var/www/html/WA_DigitalFilePro/HelperPHP.php on line 96

Warning: copy(/home/virtual/site59/fst/var/www/html/2011administration/../2011sideimages/04267caf8ce7d30d83cf298739f13b82_tmp.jpg) [function.copy]: failed to open stream: No such file or directory in /home/virtual/site59/fst/var/www/html/WA_DigitalFilePro/HelperPHP.php on line 98

Sign in to reply to this post

biz295654

Only the uploader on page. Attached. Thanks.

Attached Files
sideimage.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

all looks correct. Does this return any errors when you test it?

add the following code just before the </body> tag and post bacj the output of this code after testing an upload.

php:
POST:<br />

<pre><?php var_dump($_POST); ?></pre>
FILES:<br />
<pre><?php var_dump($_FILES); ?></pre>
<br />
<?php echo WA_DFP_AllUploadsDebug(); ?>
Sign in to reply to this post

biz295654

with or without the other error seeking code?

Sign in to reply to this post

biz295654

POST:
array(1) {
["largesubmit"]=>
string(6) "Submit"
}
FILES:
array(1) {
["largeimage"]=>
array(5) {
["name"]=>
string(10) "tester.jpg"
["type"]=>
string(10) "image/jpeg"
["tmp_name"]=>
string(14) "/tmp/phpAQ2mux"
["error"]=>
int(0)
["size"]=>
int(19573)
}
}

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